<!DOCTYPE html><html lang="en"><head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        
        
        
        <link rel="shortcut icon" href="../doc/web/favicon.ico">

<!--	<title>Examples - MFEM</title>  -->
    <title>MFEM - Finite Element Discretization Library</title>

        <link href="../doc/web/bootstrap-mfem.min.css" rel="stylesheet">
        <link href="../doc/web/font-awesome-4.0.3.css" rel="stylesheet">
        <link rel="stylesheet" href="../doc/web/highlight.css">
        <link href="../doc/web/base.css" rel="stylesheet">

        <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!--[if lt IE 9]>
            <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
            <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
        <![endif]-->

        
        <script async="" src="//www.google-analytics.com/analytics.js"></script><script>
            (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
            (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
            m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
            })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

            ga('create', 'UA-101697-3', 'mfem.org');
            ga('send', 'pageview');
        </script>
        
    <style type="text/css">.MathJax_Hover_Frame {border-radius: .25em; -webkit-border-radius: .25em; -moz-border-radius: .25em; -khtml-border-radius: .25em; box-shadow: 0px 0px 15px #83A; -webkit-box-shadow: 0px 0px 15px #83A; -moz-box-shadow: 0px 0px 15px #83A; -khtml-box-shadow: 0px 0px 15px #83A; border: 1px solid #A6D ! important; display: inline-block; position: absolute}
.MathJax_Menu_Button .MathJax_Hover_Arrow {position: absolute; cursor: pointer; display: inline-block; border: 2px solid #AAA; border-radius: 4px; -webkit-border-radius: 4px; -moz-border-radius: 4px; -khtml-border-radius: 4px; font-family: 'Courier New',Courier; font-size: 9px; color: #F0F0F0}
.MathJax_Menu_Button .MathJax_Hover_Arrow span {display: block; background-color: #AAA; border: 1px solid; border-radius: 3px; line-height: 0; padding: 4px}
.MathJax_Hover_Arrow:hover {color: white!important; border: 2px solid #CCC!important}
.MathJax_Hover_Arrow:hover span {background-color: #CCC!important}
</style><style type="text/css">#MathJax_About {position: fixed; left: 50%; width: auto; text-align: center; border: 3px outset; padding: 1em 2em; background-color: #DDDDDD; color: black; cursor: default; font-family: message-box; font-size: 120%; font-style: normal; text-indent: 0; text-transform: none; line-height: normal; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; z-index: 201; border-radius: 15px; -webkit-border-radius: 15px; -moz-border-radius: 15px; -khtml-border-radius: 15px; box-shadow: 0px 10px 20px #808080; -webkit-box-shadow: 0px 10px 20px #808080; -moz-box-shadow: 0px 10px 20px #808080; -khtml-box-shadow: 0px 10px 20px #808080; filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')}
#MathJax_About.MathJax_MousePost {outline: none}
.MathJax_Menu {position: absolute; background-color: white; color: black; width: auto; padding: 5px 0px; border: 1px solid #CCCCCC; margin: 0; cursor: default; font: menu; text-align: left; text-indent: 0; text-transform: none; line-height: normal; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; z-index: 201; border-radius: 5px; -webkit-border-radius: 5px; -moz-border-radius: 5px; -khtml-border-radius: 5px; box-shadow: 0px 10px 20px #808080; -webkit-box-shadow: 0px 10px 20px #808080; -moz-box-shadow: 0px 10px 20px #808080; -khtml-box-shadow: 0px 10px 20px #808080; filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')}
.MathJax_MenuItem {padding: 1px 2em; background: transparent}
.MathJax_MenuArrow {position: absolute; right: .5em; padding-top: .25em; color: #666666; font-size: .75em}
.MathJax_MenuActive .MathJax_MenuArrow {color: white}
.MathJax_MenuArrow.RTL {left: .5em; right: auto}
.MathJax_MenuCheck {position: absolute; left: .7em}
.MathJax_MenuCheck.RTL {right: .7em; left: auto}
.MathJax_MenuRadioCheck {position: absolute; left: .7em}
.MathJax_MenuRadioCheck.RTL {right: .7em; left: auto}
.MathJax_MenuLabel {padding: 1px 2em 3px 1.33em; font-style: italic}
.MathJax_MenuRule {border-top: 1px solid #DDDDDD; margin: 4px 3px}
.MathJax_MenuDisabled {color: GrayText}
.MathJax_MenuActive {background-color: #606872; color: white}
.MathJax_MenuDisabled:focus, .MathJax_MenuLabel:focus {background-color: #E8E8E8}
.MathJax_ContextMenu:focus {outline: none}
.MathJax_ContextMenu .MathJax_MenuItem:focus {outline: none}
#MathJax_AboutClose {top: .2em; right: .2em}
.MathJax_Menu .MathJax_MenuClose {top: -10px; left: -10px}
.MathJax_MenuClose {position: absolute; cursor: pointer; display: inline-block; border: 2px solid #AAA; border-radius: 18px; -webkit-border-radius: 18px; -moz-border-radius: 18px; -khtml-border-radius: 18px; font-family: 'Courier New',Courier; font-size: 24px; color: #F0F0F0}
.MathJax_MenuClose span {display: block; background-color: #AAA; border: 1.5px solid; border-radius: 18px; -webkit-border-radius: 18px; -moz-border-radius: 18px; -khtml-border-radius: 18px; line-height: 0; padding: 8px 0 6px}
.MathJax_MenuClose:hover {color: white!important; border: 2px solid #CCC!important}
.MathJax_MenuClose:hover span {background-color: #CCC!important}
.MathJax_MenuClose:hover:focus {outline: none}
</style><style type="text/css">.MathJax_Preview .MJXf-math {color: inherit!important}
</style><style type="text/css">.MJX_Assistive_MathML {position: absolute!important; top: 0; left: 0; clip: rect(1px, 1px, 1px, 1px); padding: 1px 0 0 0!important; border: 0!important; height: 1px!important; width: 1px!important; overflow: hidden!important; display: block!important; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none}
.MJX_Assistive_MathML.MJX_Assistive_MathML_Block {width: 100%!important}
</style><style type="text/css">#MathJax_Zoom {position: absolute; background-color: #F0F0F0; overflow: auto; display: block; z-index: 301; padding: .5em; border: 1px solid black; margin: 0; font-weight: normal; font-style: normal; text-align: left; text-indent: 0; text-transform: none; line-height: normal; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; box-shadow: 5px 5px 15px #AAAAAA; -webkit-box-shadow: 5px 5px 15px #AAAAAA; -moz-box-shadow: 5px 5px 15px #AAAAAA; -khtml-box-shadow: 5px 5px 15px #AAAAAA; filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')}
#MathJax_ZoomOverlay {position: absolute; left: 0; top: 0; z-index: 300; display: inline-block; width: 100%; height: 100%; border: 0; padding: 0; margin: 0; background-color: white; opacity: 0; filter: alpha(opacity=0)}
#MathJax_ZoomFrame {position: relative; display: inline-block; height: 0; width: 0}
#MathJax_ZoomEventTrap {position: absolute; left: 0; top: 0; z-index: 302; display: inline-block; border: 0; padding: 0; margin: 0; background-color: white; opacity: 0; filter: alpha(opacity=0)}
</style><style type="text/css">.MathJax_Preview {color: #888}
#MathJax_Message {position: fixed; left: 1px; bottom: 2px; background-color: #E6E6E6; border: 1px solid #959595; margin: 0px; padding: 2px 8px; z-index: 102; color: black; font-size: 80%; width: auto; white-space: nowrap}
#MathJax_MSIE_Frame {position: absolute; top: 0; left: 0; width: 0px; z-index: 101; border: 0px; margin: 0px; padding: 0px}
.MathJax_Error {color: #CC0000; font-style: italic}
</style><style type="text/css">.MJXp-script {font-size: .8em}
.MJXp-right {-webkit-transform-origin: right; -moz-transform-origin: right; -ms-transform-origin: right; -o-transform-origin: right; transform-origin: right}
.MJXp-bold {font-weight: bold}
.MJXp-italic {font-style: italic}
.MJXp-scr {font-family: MathJax_Script,'Times New Roman',Times,STIXGeneral,serif}
.MJXp-frak {font-family: MathJax_Fraktur,'Times New Roman',Times,STIXGeneral,serif}
.MJXp-sf {font-family: MathJax_SansSerif,'Times New Roman',Times,STIXGeneral,serif}
.MJXp-cal {font-family: MathJax_Caligraphic,'Times New Roman',Times,STIXGeneral,serif}
.MJXp-mono {font-family: MathJax_Typewriter,'Times New Roman',Times,STIXGeneral,serif}
.MJXp-largeop {font-size: 150%}
.MJXp-largeop.MJXp-int {vertical-align: -.2em}
.MJXp-math {display: inline-block; line-height: 1.2; text-indent: 0; font-family: 'Times New Roman',Times,STIXGeneral,serif; white-space: nowrap; border-collapse: collapse}
.MJXp-display {display: block; text-align: center; margin: 1em 0}
.MJXp-math span {display: inline-block}
.MJXp-box {display: block!important; text-align: center}
.MJXp-box:after {content: " "}
.MJXp-rule {display: block!important; margin-top: .1em}
.MJXp-char {display: block!important}
.MJXp-mo {margin: 0 .15em}
.MJXp-mfrac {margin: 0 .125em; vertical-align: .25em}
.MJXp-denom {display: inline-table!important; width: 100%}
.MJXp-denom > * {display: table-row!important}
.MJXp-surd {vertical-align: top}
.MJXp-surd > * {display: block!important}
.MJXp-script-box > *  {display: table!important; height: 50%}
.MJXp-script-box > * > * {display: table-cell!important; vertical-align: top}
.MJXp-script-box > *:last-child > * {vertical-align: bottom}
.MJXp-script-box > * > * > * {display: block!important}
.MJXp-mphantom {visibility: hidden}
.MJXp-munderover {display: inline-table!important}
.MJXp-over {display: inline-block!important; text-align: center}
.MJXp-over > * {display: block!important}
.MJXp-munderover > * {display: table-row!important}
.MJXp-mtable {vertical-align: .25em; margin: 0 .125em}
.MJXp-mtable > * {display: inline-table!important; vertical-align: middle}
.MJXp-mtr {display: table-row!important}
.MJXp-mtd {display: table-cell!important; text-align: center; padding: .5em 0 0 .5em}
.MJXp-mtr > .MJXp-mtd:first-child {padding-left: 0}
.MJXp-mtr:first-child > .MJXp-mtd {padding-top: 0}
.MJXp-mlabeledtr {display: table-row!important}
.MJXp-mlabeledtr > .MJXp-mtd:first-child {padding-left: 0}
.MJXp-mlabeledtr:first-child > .MJXp-mtd {padding-top: 0}
.MJXp-merror {background-color: #FFFF88; color: #CC0000; border: 1px solid #CC0000; padding: 1px 3px; font-style: normal; font-size: 90%}
.MJXp-scale0 {-webkit-transform: scaleX(.0); -moz-transform: scaleX(.0); -ms-transform: scaleX(.0); -o-transform: scaleX(.0); transform: scaleX(.0)}
.MJXp-scale1 {-webkit-transform: scaleX(.1); -moz-transform: scaleX(.1); -ms-transform: scaleX(.1); -o-transform: scaleX(.1); transform: scaleX(.1)}
.MJXp-scale2 {-webkit-transform: scaleX(.2); -moz-transform: scaleX(.2); -ms-transform: scaleX(.2); -o-transform: scaleX(.2); transform: scaleX(.2)}
.MJXp-scale3 {-webkit-transform: scaleX(.3); -moz-transform: scaleX(.3); -ms-transform: scaleX(.3); -o-transform: scaleX(.3); transform: scaleX(.3)}
.MJXp-scale4 {-webkit-transform: scaleX(.4); -moz-transform: scaleX(.4); -ms-transform: scaleX(.4); -o-transform: scaleX(.4); transform: scaleX(.4)}
.MJXp-scale5 {-webkit-transform: scaleX(.5); -moz-transform: scaleX(.5); -ms-transform: scaleX(.5); -o-transform: scaleX(.5); transform: scaleX(.5)}
.MJXp-scale6 {-webkit-transform: scaleX(.6); -moz-transform: scaleX(.6); -ms-transform: scaleX(.6); -o-transform: scaleX(.6); transform: scaleX(.6)}
.MJXp-scale7 {-webkit-transform: scaleX(.7); -moz-transform: scaleX(.7); -ms-transform: scaleX(.7); -o-transform: scaleX(.7); transform: scaleX(.7)}
.MJXp-scale8 {-webkit-transform: scaleX(.8); -moz-transform: scaleX(.8); -ms-transform: scaleX(.8); -o-transform: scaleX(.8); transform: scaleX(.8)}
.MJXp-scale9 {-webkit-transform: scaleX(.9); -moz-transform: scaleX(.9); -ms-transform: scaleX(.9); -o-transform: scaleX(.9); transform: scaleX(.9)}
.MathJax_PHTML .noError {vertical-align: ; font-size: 90%; text-align: left; color: black; padding: 1px 3px; border: 1px solid}
</style><style type="text/css">.MathJax_SVG_Display {text-align: center; margin: 1em 0em; position: relative; display: block!important; text-indent: 0; max-width: none; max-height: none; min-width: 0; min-height: 0; width: 100%}
.MathJax_SVG .MJX-monospace {font-family: monospace}
.MathJax_SVG .MJX-sans-serif {font-family: sans-serif}
#MathJax_SVG_Tooltip {background-color: InfoBackground; color: InfoText; border: 1px solid black; box-shadow: 2px 2px 5px #AAAAAA; -webkit-box-shadow: 2px 2px 5px #AAAAAA; -moz-box-shadow: 2px 2px 5px #AAAAAA; -khtml-box-shadow: 2px 2px 5px #AAAAAA; padding: 3px 4px; z-index: 401; position: absolute; left: 0; top: 0; width: auto; height: auto; display: none}
.MathJax_SVG {display: inline; font-style: normal; font-weight: normal; line-height: normal; font-size: 100%; font-size-adjust: none; text-indent: 0; text-align: left; text-transform: none; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0; min-height: 0; border: 0; padding: 0; margin: 0}
.MathJax_SVG * {transition: none; -webkit-transition: none; -moz-transition: none; -ms-transition: none; -o-transition: none}
.mjx-svg-href {fill: blue; stroke: blue}
.MathJax_SVG_Processing {visibility: hidden; position: absolute; top: 0; left: 0; width: 0; height: 0; overflow: hidden; display: block!important}
.MathJax_SVG_Processed {display: none!important}
.MathJax_SVG_ExBox {display: block!important; overflow: hidden; width: 1px; height: 60ex; min-height: 0; max-height: none; padding: 0; border: 0; margin: 0}
.MathJax_SVG_LineBox {display: table!important}
.MathJax_SVG_LineBox span {display: table-cell!important; width: 10000em!important; min-width: 0; max-width: none; padding: 0; border: 0; margin: 0}
.MathJax_SVG .noError {vertical-align: ; font-size: 90%; text-align: left; color: black; padding: 1px 3px; border: 1px solid}
</style></head>

    <body style=""><div style="visibility: hidden; overflow: hidden; position: absolute; top: 0px; height: 1px; width: auto; padding: 0px; border: 0px; margin: 0px; text-align: left; text-indent: 0px; text-transform: none; line-height: normal; letter-spacing: normal; word-spacing: normal;"><div id="MathJax_SVG_Hidden"></div><svg><defs id="MathJax_SVG_glyphs"><path stroke-width="1" id="MJMATHI-4C" d="M228 637Q194 637 192 641Q191 643 191 649Q191 673 202 682Q204 683 217 683Q271 680 344 680Q485 680 506 683H518Q524 677 524 674T522 656Q517 641 513 637H475Q406 636 394 628Q387 624 380 600T313 336Q297 271 279 198T252 88L243 52Q243 48 252 48T311 46H328Q360 46 379 47T428 54T478 72T522 106T564 161Q580 191 594 228T611 270Q616 273 628 273H641Q647 264 647 262T627 203T583 83T557 9Q555 4 553 3T537 0T494 -1Q483 -1 418 -1T294 0H116Q32 0 32 10Q32 17 34 24Q39 43 44 45Q48 46 59 46H65Q92 46 125 49Q139 52 144 61Q147 65 216 339T285 628Q285 635 228 637Z"></path><path stroke-width="1" id="MJMAIN-32" d="M109 429Q82 429 66 447T50 491Q50 562 103 614T235 666Q326 666 387 610T449 465Q449 422 429 383T381 315T301 241Q265 210 201 149L142 93L218 92Q375 92 385 97Q392 99 409 186V189H449V186Q448 183 436 95T421 3V0H50V19V31Q50 38 56 46T86 81Q115 113 136 137Q145 147 170 174T204 211T233 244T261 278T284 308T305 340T320 369T333 401T340 431T343 464Q343 527 309 573T212 619Q179 619 154 602T119 569T109 550Q109 549 114 549Q132 549 151 535T170 489Q170 464 154 447T109 429Z"></path><path stroke-width="1" id="MJMATHI-48" d="M228 637Q194 637 192 641Q191 643 191 649Q191 673 202 682Q204 683 219 683Q260 681 355 681Q389 681 418 681T463 682T483 682Q499 682 499 672Q499 670 497 658Q492 641 487 638H485Q483 638 480 638T473 638T464 637T455 637Q416 636 405 634T387 623Q384 619 355 500Q348 474 340 442T328 395L324 380Q324 378 469 378H614L615 381Q615 384 646 504Q674 619 674 627T617 637Q594 637 587 639T580 648Q580 650 582 660Q586 677 588 679T604 682Q609 682 646 681T740 680Q802 680 835 681T871 682Q888 682 888 672Q888 645 876 638H874Q872 638 869 638T862 638T853 637T844 637Q805 636 794 634T776 623Q773 618 704 340T634 58Q634 51 638 51Q646 48 692 46H723Q729 38 729 37T726 19Q722 6 716 0H701Q664 2 567 2Q533 2 504 2T458 2T437 1Q420 1 420 10Q420 15 423 24Q428 43 433 45Q437 46 448 46H454Q481 46 514 49Q520 50 522 50T528 55T534 64T540 82T547 110T558 153Q565 181 569 198Q602 330 602 331T457 332H312L279 197Q245 63 245 58Q245 51 253 49T303 46H334Q340 38 340 37T337 19Q333 6 327 0H312Q275 2 178 2Q144 2 115 2T69 2T48 1Q31 1 31 10Q31 12 34 24Q39 43 44 45Q48 46 59 46H65Q92 46 125 49Q139 52 144 61Q147 65 216 339T285 628Q285 635 228 637Z"></path><path stroke-width="1" id="MJMAIN-31" d="M213 578L200 573Q186 568 160 563T102 556H83V602H102Q149 604 189 617T245 641T273 663Q275 666 285 666Q294 666 302 660V361L303 61Q310 54 315 52T339 48T401 46H427V0H416Q395 3 257 3Q121 3 100 0H88V46H114Q136 46 152 46T177 47T193 50T201 52T207 57T213 61V578Z"></path><path stroke-width="1" id="MJMAIN-28" d="M94 250Q94 319 104 381T127 488T164 576T202 643T244 695T277 729T302 750H315H319Q333 750 333 741Q333 738 316 720T275 667T226 581T184 443T167 250T184 58T225 -81T274 -167T316 -220T333 -241Q333 -250 318 -250H315H302L274 -226Q180 -141 137 -14T94 250Z"></path><path stroke-width="1" id="MJMATHI-63" d="M34 159Q34 268 120 355T306 442Q362 442 394 418T427 355Q427 326 408 306T360 285Q341 285 330 295T319 325T330 359T352 380T366 386H367Q367 388 361 392T340 400T306 404Q276 404 249 390Q228 381 206 359Q162 315 142 235T121 119Q121 73 147 50Q169 26 205 26H209Q321 26 394 111Q403 121 406 121Q410 121 419 112T429 98T420 83T391 55T346 25T282 0T202 -11Q127 -11 81 37T34 159Z"></path><path stroke-width="1" id="MJMATHI-75" d="M21 287Q21 295 30 318T55 370T99 420T158 442Q204 442 227 417T250 358Q250 340 216 246T182 105Q182 62 196 45T238 27T291 44T328 78L339 95Q341 99 377 247Q407 367 413 387T427 416Q444 431 463 431Q480 431 488 421T496 402L420 84Q419 79 419 68Q419 43 426 35T447 26Q469 29 482 57T512 145Q514 153 532 153Q551 153 551 144Q550 139 549 130T540 98T523 55T498 17T462 -8Q454 -10 438 -10Q372 -10 347 46Q345 45 336 36T318 21T296 6T267 -6T233 -11Q189 -11 155 7Q103 38 103 113Q103 170 138 262T173 379Q173 380 173 381Q173 390 173 393T169 400T158 404H154Q131 404 112 385T82 344T65 302T57 280Q55 278 41 278H27Q21 284 21 287Z"></path><path stroke-width="1" id="MJMATHI-72" d="M21 287Q22 290 23 295T28 317T38 348T53 381T73 411T99 433T132 442Q161 442 183 430T214 408T225 388Q227 382 228 382T236 389Q284 441 347 441H350Q398 441 422 400Q430 381 430 363Q430 333 417 315T391 292T366 288Q346 288 334 299T322 328Q322 376 378 392Q356 405 342 405Q286 405 239 331Q229 315 224 298T190 165Q156 25 151 16Q138 -11 108 -11Q95 -11 87 -5T76 7T74 17Q74 30 114 189T154 366Q154 405 128 405Q107 405 92 377T68 316T57 280Q55 278 41 278H27Q21 284 21 287Z"></path><path stroke-width="1" id="MJMATHI-6C" d="M117 59Q117 26 142 26Q179 26 205 131Q211 151 215 152Q217 153 225 153H229Q238 153 241 153T246 151T248 144Q247 138 245 128T234 90T214 43T183 6T137 -11Q101 -11 70 11T38 85Q38 97 39 102L104 360Q167 615 167 623Q167 626 166 628T162 632T157 634T149 635T141 636T132 637T122 637Q112 637 109 637T101 638T95 641T94 647Q94 649 96 661Q101 680 107 682T179 688Q194 689 213 690T243 693T254 694Q266 694 266 686Q266 675 193 386T118 83Q118 81 118 75T117 65V59Z"></path><path stroke-width="1" id="MJMAIN-29" d="M60 749L64 750Q69 750 74 750H86L114 726Q208 641 251 514T294 250Q294 182 284 119T261 12T224 -76T186 -143T145 -194T113 -227T90 -246Q87 -249 86 -250H74Q66 -250 63 -250T58 -247T55 -238Q56 -237 66 -225Q221 -64 221 250T66 725Q56 737 55 738Q55 746 60 749Z"></path><path stroke-width="1" id="MJMATHI-64" d="M366 683Q367 683 438 688T511 694Q523 694 523 686Q523 679 450 384T375 83T374 68Q374 26 402 26Q411 27 422 35Q443 55 463 131Q469 151 473 152Q475 153 483 153H487H491Q506 153 506 145Q506 140 503 129Q490 79 473 48T445 8T417 -8Q409 -10 393 -10Q359 -10 336 5T306 36L300 51Q299 52 296 50Q294 48 292 46Q233 -10 172 -10Q117 -10 75 30T33 157Q33 205 53 255T101 341Q148 398 195 420T280 442Q336 442 364 400Q369 394 369 396Q370 400 396 505T424 616Q424 629 417 632T378 637H357Q351 643 351 645T353 664Q358 683 366 683ZM352 326Q329 405 277 405Q242 405 210 374T160 293Q131 214 119 129Q119 126 119 118T118 106Q118 61 136 44T179 26Q233 26 290 98L298 109L352 326Z"></path><path stroke-width="1" id="MJMATHI-69" d="M184 600Q184 624 203 642T247 661Q265 661 277 649T290 619Q290 596 270 577T226 557Q211 557 198 567T184 600ZM21 287Q21 295 30 318T54 369T98 420T158 442Q197 442 223 419T250 357Q250 340 236 301T196 196T154 83Q149 61 149 51Q149 26 166 26Q175 26 185 29T208 43T235 78T260 137Q263 149 265 151T282 153Q302 153 302 143Q302 135 293 112T268 61T223 11T161 -11Q129 -11 102 10T74 74Q74 91 79 106T122 220Q160 321 166 341T173 380Q173 404 156 404H154Q124 404 99 371T61 287Q60 286 59 284T58 281T56 279T53 278T49 278T41 278H27Q21 284 21 287Z"></path><path stroke-width="1" id="MJMATHI-76" d="M173 380Q173 405 154 405Q130 405 104 376T61 287Q60 286 59 284T58 281T56 279T53 278T49 278T41 278H27Q21 284 21 287Q21 294 29 316T53 368T97 419T160 441Q202 441 225 417T249 361Q249 344 246 335Q246 329 231 291T200 202T182 113Q182 86 187 69Q200 26 250 26Q287 26 319 60T369 139T398 222T409 277Q409 300 401 317T383 343T365 361T357 383Q357 405 376 424T417 443Q436 443 451 425T467 367Q467 340 455 284T418 159T347 40T241 -11Q177 -11 139 22Q102 54 102 117Q102 148 110 181T151 298Q173 362 173 380Z"></path><path stroke-width="1" id="MJMAIN-2212" d="M84 237T84 250T98 270H679Q694 262 694 250T679 230H98Q84 237 84 250Z"></path><path stroke-width="1" id="MJMAIN-2F" d="M423 750Q432 750 438 744T444 730Q444 725 271 248T92 -240Q85 -250 75 -250Q68 -250 62 -245T56 -231Q56 -221 230 257T407 740Q411 750 423 750Z"></path><path stroke-width="1" id="MJMAIN-394" d="M51 0Q46 4 46 7Q46 9 215 357T388 709Q391 716 416 716Q439 716 444 709Q447 705 616 357T786 7Q786 4 781 0H51ZM507 344L384 596L137 92L383 91H630Q630 93 507 344Z"></path><path stroke-width="1" id="MJMAIN-3D" d="M56 347Q56 360 70 367H707Q722 359 722 347Q722 336 708 328L390 327H72Q56 332 56 347ZM56 153Q56 168 72 173H708Q722 163 722 153Q722 140 707 133H70Q56 140 56 153Z"></path><path stroke-width="1" id="MJMAIN-64" d="M376 495Q376 511 376 535T377 568Q377 613 367 624T316 637H298V660Q298 683 300 683L310 684Q320 685 339 686T376 688Q393 689 413 690T443 693T454 694H457V390Q457 84 458 81Q461 61 472 55T517 46H535V0Q533 0 459 -5T380 -11H373V44L365 37Q307 -11 235 -11Q158 -11 96 50T34 215Q34 315 97 378T244 442Q319 442 376 393V495ZM373 342Q328 405 260 405Q211 405 173 369Q146 341 139 305T131 211Q131 155 138 120T173 59Q203 26 251 26Q322 26 373 103V342Z"></path><path stroke-width="1" id="MJMAIN-69" d="M69 609Q69 637 87 653T131 669Q154 667 171 652T188 609Q188 579 171 564T129 549Q104 549 87 564T69 609ZM247 0Q232 3 143 3Q132 3 106 3T56 1L34 0H26V46H42Q70 46 91 49Q100 53 102 60T104 102V205V293Q104 345 102 359T88 378Q74 385 41 385H30V408Q30 431 32 431L42 432Q52 433 70 434T106 436Q123 437 142 438T171 441T182 442H185V62Q190 52 197 50T232 46H255V0H247Z"></path><path stroke-width="1" id="MJMAIN-76" d="M338 431Q344 429 422 429Q479 429 503 431H508V385H497Q439 381 423 345Q421 341 356 172T288 -2Q283 -11 263 -11Q244 -11 239 -2Q99 359 98 364Q93 378 82 381T43 385H19V431H25L33 430Q41 430 53 430T79 430T104 429T122 428Q217 428 232 431H240V385H226Q187 384 184 370Q184 366 235 234L286 102L377 341V349Q377 363 367 372T349 383T335 385H331V431H338Z"></path><path stroke-width="1" id="MJMATHI-3C3" d="M184 -11Q116 -11 74 34T31 147Q31 247 104 333T274 430Q275 431 414 431H552Q553 430 555 429T559 427T562 425T565 422T567 420T569 416T570 412T571 407T572 401Q572 357 507 357Q500 357 490 357T476 358H416L421 348Q439 310 439 263Q439 153 359 71T184 -11ZM361 278Q361 358 276 358Q152 358 115 184Q114 180 114 178Q106 141 106 117Q106 67 131 47T188 26Q242 26 287 73Q316 103 334 153T356 233T361 278Z"></path><path stroke-width="1" id="MJMAINB-75" d="M40 442L134 446Q228 450 229 450H235V273V165Q235 90 238 74T254 52Q268 46 304 46H319Q352 46 380 67T419 121L420 123Q424 135 425 199Q425 201 425 207Q425 233 425 249V316Q425 354 423 363T410 376Q396 380 369 380H356V442L554 450V267Q554 84 556 79Q561 62 610 62H623V31Q623 0 622 0Q603 0 527 -3T432 -6Q431 -6 431 25V56L420 45Q373 6 332 -1Q313 -6 281 -6Q208 -6 165 14T109 87L107 98L106 230Q106 358 104 366Q96 380 50 380H37V442H40Z"></path><path stroke-width="1" id="MJMAIN-30" d="M96 585Q152 666 249 666Q297 666 345 640T423 548Q460 465 460 320Q460 165 417 83Q397 41 362 16T301 -15T250 -22Q224 -22 198 -16T137 16T82 83Q39 165 39 320Q39 494 96 585ZM321 597Q291 629 250 629Q208 629 178 597Q153 571 145 525T137 333Q137 175 145 125T181 46Q209 16 250 16Q290 16 318 46Q347 76 354 130T362 333Q362 478 354 524T321 597Z"></path><path stroke-width="1" id="MJMATHI-3BB" d="M166 673Q166 685 183 694H202Q292 691 316 644Q322 629 373 486T474 207T524 67Q531 47 537 34T546 15T551 6T555 2T556 -2T550 -11H482Q457 3 450 18T399 152L354 277L340 262Q327 246 293 207T236 141Q211 112 174 69Q123 9 111 -1T83 -12Q47 -12 47 20Q47 37 61 52T199 187Q229 216 266 252T321 306L338 322Q338 323 288 462T234 612Q214 657 183 657Q166 657 166 673Z"></path><path stroke-width="1" id="MJMATHI-49" d="M43 1Q26 1 26 10Q26 12 29 24Q34 43 39 45Q42 46 54 46H60Q120 46 136 53Q137 53 138 54Q143 56 149 77T198 273Q210 318 216 344Q286 624 286 626Q284 630 284 631Q274 637 213 637H193Q184 643 189 662Q193 677 195 680T209 683H213Q285 681 359 681Q481 681 487 683H497Q504 676 504 672T501 655T494 639Q491 637 471 637Q440 637 407 634Q393 631 388 623Q381 609 337 432Q326 385 315 341Q245 65 245 59Q245 52 255 50T307 46H339Q345 38 345 37T342 19Q338 6 332 0H316Q279 2 179 2Q143 2 113 2T65 2T43 1Z"></path><path stroke-width="1" id="MJMAIN-2B" d="M56 237T56 250T70 270H369V420L370 570Q380 583 389 583Q402 583 409 568V270H707Q722 262 722 250T707 230H409V-68Q401 -82 391 -82H389H387Q375 -82 369 -68V230H70Q56 237 56 250Z"></path><path stroke-width="1" id="MJMATHI-3BC" d="M58 -216Q44 -216 34 -208T23 -186Q23 -176 96 116T173 414Q186 442 219 442Q231 441 239 435T249 423T251 413Q251 401 220 279T187 142Q185 131 185 107V99Q185 26 252 26Q261 26 270 27T287 31T302 38T315 45T327 55T338 65T348 77T356 88T365 100L372 110L408 253Q444 395 448 404Q461 431 491 431Q504 431 512 424T523 412T525 402L449 84Q448 79 448 68Q448 43 455 35T476 26Q485 27 496 35Q517 55 537 131Q543 151 547 152Q549 153 557 153H561Q580 153 580 144Q580 138 575 117T555 63T523 13Q510 0 491 -8Q483 -10 467 -10Q446 -10 429 -4T402 11T385 29T376 44T374 51L368 45Q362 39 350 30T324 12T288 -4T246 -11Q199 -11 153 12L129 -85Q108 -167 104 -180T92 -202Q76 -216 58 -216Z"></path><path stroke-width="1" id="MJMAIN-2207" d="M46 676Q46 679 51 683H781Q786 679 786 676Q786 674 617 326T444 -26Q439 -33 416 -33T388 -26Q385 -22 216 326T46 676ZM697 596Q697 597 445 597T193 596Q195 591 319 336T445 80L697 596Z"></path><path stroke-width="1" id="MJMATHI-54" d="M40 437Q21 437 21 445Q21 450 37 501T71 602L88 651Q93 669 101 677H569H659Q691 677 697 676T704 667Q704 661 687 553T668 444Q668 437 649 437Q640 437 637 437T631 442L629 445Q629 451 635 490T641 551Q641 586 628 604T573 629Q568 630 515 631Q469 631 457 630T439 622Q438 621 368 343T298 60Q298 48 386 46Q418 46 427 45T436 36Q436 31 433 22Q429 4 424 1L422 0Q419 0 415 0Q410 0 363 1T228 2Q99 2 64 0H49Q43 6 43 9T45 27Q49 40 55 46H83H94Q174 46 189 55Q190 56 191 56Q196 59 201 76T241 233Q258 301 269 344Q339 619 339 625Q339 630 310 630H279Q212 630 191 624Q146 614 121 583T67 467Q60 445 57 441T43 437H40Z"></path><path stroke-width="1" id="MJMAIN-22C5" d="M78 250Q78 274 95 292T138 310Q162 310 180 294T199 251Q199 226 182 208T139 190T96 207T78 250Z"></path><path stroke-width="1" id="MJMATHI-6E" d="M21 287Q22 293 24 303T36 341T56 388T89 425T135 442Q171 442 195 424T225 390T231 369Q231 367 232 367L243 378Q304 442 382 442Q436 442 469 415T503 336T465 179T427 52Q427 26 444 26Q450 26 453 27Q482 32 505 65T540 145Q542 153 560 153Q580 153 580 145Q580 144 576 130Q568 101 554 73T508 17T439 -10Q392 -10 371 17T350 73Q350 92 386 193T423 345Q423 404 379 404H374Q288 404 229 303L222 291L189 157Q156 26 151 16Q138 -11 108 -11Q95 -11 87 -5T76 7T74 17Q74 30 112 180T152 343Q153 348 153 366Q153 405 129 405Q91 405 66 305Q60 285 60 284Q58 278 41 278H27Q21 284 21 287Z"></path><path stroke-width="1" id="MJMATHI-66" d="M118 -162Q120 -162 124 -164T135 -167T147 -168Q160 -168 171 -155T187 -126Q197 -99 221 27T267 267T289 382V385H242Q195 385 192 387Q188 390 188 397L195 425Q197 430 203 430T250 431Q298 431 298 432Q298 434 307 482T319 540Q356 705 465 705Q502 703 526 683T550 630Q550 594 529 578T487 561Q443 561 443 603Q443 622 454 636T478 657L487 662Q471 668 457 668Q445 668 434 658T419 630Q412 601 403 552T387 469T380 433Q380 431 435 431Q480 431 487 430T498 424Q499 420 496 407T491 391Q489 386 482 386T428 385H372L349 263Q301 15 282 -47Q255 -132 212 -173Q175 -205 139 -205Q107 -205 81 -186T55 -132Q55 -95 76 -78T118 -61Q162 -61 162 -103Q162 -122 151 -136T127 -157L118 -162Z"></path><path stroke-width="1" id="MJMAIN-D7" d="M630 29Q630 9 609 9Q604 9 587 25T493 118L389 222L284 117Q178 13 175 11Q171 9 168 9Q160 9 154 15T147 29Q147 36 161 51T255 146L359 250L255 354Q174 435 161 449T147 471Q147 480 153 485T168 490Q173 490 175 489Q178 487 284 383L389 278L493 382Q570 459 587 475T609 491Q630 491 630 471Q630 464 620 453T522 355L418 250L522 145Q606 61 618 48T630 29Z"></path><path stroke-width="1" id="MJMATHI-45" d="M492 213Q472 213 472 226Q472 230 477 250T482 285Q482 316 461 323T364 330H312Q311 328 277 192T243 52Q243 48 254 48T334 46Q428 46 458 48T518 61Q567 77 599 117T670 248Q680 270 683 272Q690 274 698 274Q718 274 718 261Q613 7 608 2Q605 0 322 0H133Q31 0 31 11Q31 13 34 25Q38 41 42 43T65 46Q92 46 125 49Q139 52 144 61Q146 66 215 342T285 622Q285 629 281 629Q273 632 228 634H197Q191 640 191 642T193 659Q197 676 203 680H757Q764 676 764 669Q764 664 751 557T737 447Q735 440 717 440H705Q698 445 698 453L701 476Q704 500 704 528Q704 558 697 578T678 609T643 625T596 632T532 634H485Q397 633 392 631Q388 629 386 622Q385 619 355 499T324 377Q347 376 372 376H398Q464 376 489 391T534 472Q538 488 540 490T557 493Q562 493 565 493T570 492T572 491T574 487T577 483L544 351Q511 218 508 216Q505 213 492 213Z"></path><path stroke-width="1" id="MJMAIN-67" d="M329 409Q373 453 429 453Q459 453 472 434T485 396Q485 382 476 371T449 360Q416 360 412 390Q410 404 415 411Q415 412 416 414V415Q388 412 363 393Q355 388 355 386Q355 385 359 381T368 369T379 351T388 325T392 292Q392 230 343 187T222 143Q172 143 123 171Q112 153 112 133Q112 98 138 81Q147 75 155 75T227 73Q311 72 335 67Q396 58 431 26Q470 -13 470 -72Q470 -139 392 -175Q332 -206 250 -206Q167 -206 107 -175Q29 -140 29 -75Q29 -39 50 -15T92 18L103 24Q67 55 67 108Q67 155 96 193Q52 237 52 292Q52 355 102 398T223 442Q274 442 318 416L329 409ZM299 343Q294 371 273 387T221 404Q192 404 171 388T145 343Q142 326 142 292Q142 248 149 227T179 192Q196 182 222 182Q244 182 260 189T283 207T294 227T299 242Q302 258 302 292T299 343ZM403 -75Q403 -50 389 -34T348 -11T299 -2T245 0H218Q151 0 138 -6Q118 -15 107 -34T95 -74Q95 -84 101 -97T122 -127T170 -155T250 -167Q319 -167 361 -139T403 -75Z"></path><path stroke-width="1" id="MJMAIN-72" d="M36 46H50Q89 46 97 60V68Q97 77 97 91T98 122T98 161T98 203Q98 234 98 269T98 328L97 351Q94 370 83 376T38 385H20V408Q20 431 22 431L32 432Q42 433 60 434T96 436Q112 437 131 438T160 441T171 442H174V373Q213 441 271 441H277Q322 441 343 419T364 373Q364 352 351 337T313 322Q288 322 276 338T263 372Q263 381 265 388T270 400T273 405Q271 407 250 401Q234 393 226 386Q179 341 179 207V154Q179 141 179 127T179 101T180 81T180 66V61Q181 59 183 57T188 54T193 51T200 49T207 48T216 47T225 47T235 46T245 46H276V0H267Q249 3 140 3Q37 3 28 0H20V46H36Z"></path><path stroke-width="1" id="MJMAIN-61" d="M137 305T115 305T78 320T63 359Q63 394 97 421T218 448Q291 448 336 416T396 340Q401 326 401 309T402 194V124Q402 76 407 58T428 40Q443 40 448 56T453 109V145H493V106Q492 66 490 59Q481 29 455 12T400 -6T353 12T329 54V58L327 55Q325 52 322 49T314 40T302 29T287 17T269 6T247 -2T221 -8T190 -11Q130 -11 82 20T34 107Q34 128 41 147T68 188T116 225T194 253T304 268H318V290Q318 324 312 340Q290 411 215 411Q197 411 181 410T156 406T148 403Q170 388 170 359Q170 334 154 320ZM126 106Q126 75 150 51T209 26Q247 26 276 49T315 109Q317 116 318 175Q318 233 317 233Q309 233 296 232T251 223T193 203T147 166T126 106Z"></path><path stroke-width="1" id="MJMATHI-3B1" d="M34 156Q34 270 120 356T309 442Q379 442 421 402T478 304Q484 275 485 237V208Q534 282 560 374Q564 388 566 390T582 393Q603 393 603 385Q603 376 594 346T558 261T497 161L486 147L487 123Q489 67 495 47T514 26Q528 28 540 37T557 60Q559 67 562 68T577 70Q597 70 597 62Q597 56 591 43Q579 19 556 5T512 -10H505Q438 -10 414 62L411 69L400 61Q390 53 370 41T325 18T267 -2T203 -11Q124 -11 79 39T34 156ZM208 26Q257 26 306 47T379 90L403 112Q401 255 396 290Q382 405 304 405Q235 405 183 332Q156 292 139 224T121 120Q121 71 146 49T208 26Z"></path><path stroke-width="1" id="MJMATHI-46" d="M48 1Q31 1 31 11Q31 13 34 25Q38 41 42 43T65 46Q92 46 125 49Q139 52 144 61Q146 66 215 342T285 622Q285 629 281 629Q273 632 228 634H197Q191 640 191 642T193 659Q197 676 203 680H742Q749 676 749 669Q749 664 736 557T722 447Q720 440 702 440H690Q683 445 683 453Q683 454 686 477T689 530Q689 560 682 579T663 610T626 626T575 633T503 634H480Q398 633 393 631Q388 629 386 623Q385 622 352 492L320 363H375Q378 363 398 363T426 364T448 367T472 374T489 386Q502 398 511 419T524 457T529 475Q532 480 548 480H560Q567 475 567 470Q567 467 536 339T502 207Q500 200 482 200H470Q463 206 463 212Q463 215 468 234T473 274Q473 303 453 310T364 317H309L277 190Q245 66 245 60Q245 46 334 46H359Q365 40 365 39T363 19Q359 6 353 0H336Q295 2 185 2Q120 2 86 2T48 1Z"></path><path stroke-width="1" id="MJMATHI-3B2" d="M29 -194Q23 -188 23 -186Q23 -183 102 134T186 465Q208 533 243 584T309 658Q365 705 429 705H431Q493 705 533 667T573 570Q573 465 469 396L482 383Q533 332 533 252Q533 139 448 65T257 -10Q227 -10 203 -2T165 17T143 40T131 59T126 65L62 -188Q60 -194 42 -194H29ZM353 431Q392 431 427 419L432 422Q436 426 439 429T449 439T461 453T472 471T484 495T493 524T501 560Q503 569 503 593Q503 611 502 616Q487 667 426 667Q384 667 347 643T286 582T247 514T224 455Q219 439 186 308T152 168Q151 163 151 147Q151 99 173 68Q204 26 260 26Q302 26 349 51T425 137Q441 171 449 214T457 279Q457 337 422 372Q380 358 347 358H337Q258 358 258 389Q258 396 261 403Q275 431 353 431Z"></path><path stroke-width="1" id="MJMATHI-6B" d="M121 647Q121 657 125 670T137 683Q138 683 209 688T282 694Q294 694 294 686Q294 679 244 477Q194 279 194 272Q213 282 223 291Q247 309 292 354T362 415Q402 442 438 442Q468 442 485 423T503 369Q503 344 496 327T477 302T456 291T438 288Q418 288 406 299T394 328Q394 353 410 369T442 390L458 393Q446 405 434 405H430Q398 402 367 380T294 316T228 255Q230 254 243 252T267 246T293 238T320 224T342 206T359 180T365 147Q365 130 360 106T354 66Q354 26 381 26Q429 26 459 145Q461 153 479 153H483Q499 153 499 144Q499 139 496 130Q455 -11 378 -11Q333 -11 305 15T277 90Q277 108 280 121T283 145Q283 167 269 183T234 206T200 217T182 220H180Q168 178 159 139T145 81T136 44T129 20T122 7T111 -2Q98 -11 83 -11Q66 -11 57 -1T48 16Q48 26 85 176T158 471L195 616Q196 629 188 632T149 637H144Q134 637 131 637T124 640T121 647Z"></path><path stroke-width="1" id="MJMATHI-70" d="M23 287Q24 290 25 295T30 317T40 348T55 381T75 411T101 433T134 442Q209 442 230 378L240 387Q302 442 358 442Q423 442 460 395T497 281Q497 173 421 82T249 -10Q227 -10 210 -4Q199 1 187 11T168 28L161 36Q160 35 139 -51T118 -138Q118 -144 126 -145T163 -148H188Q194 -155 194 -157T191 -175Q188 -187 185 -190T172 -194Q170 -194 161 -194T127 -193T65 -192Q-5 -192 -24 -194H-32Q-39 -187 -39 -183Q-37 -156 -26 -148H-6Q28 -147 33 -136Q36 -130 94 103T155 350Q156 355 156 364Q156 405 131 405Q109 405 94 377T71 316T59 280Q57 278 43 278H29Q23 284 23 287ZM178 102Q200 26 252 26Q282 26 310 49T356 107Q374 141 392 215T411 325V331Q411 405 350 405Q339 405 328 402T306 393T286 380T269 365T254 350T243 336T235 326L232 322Q232 321 229 308T218 264T204 212Q178 106 178 102Z"></path><path stroke-width="1" id="MJMATHI-67" d="M311 43Q296 30 267 15T206 0Q143 0 105 45T66 160Q66 265 143 353T314 442Q361 442 401 394L404 398Q406 401 409 404T418 412T431 419T447 422Q461 422 470 413T480 394Q480 379 423 152T363 -80Q345 -134 286 -169T151 -205Q10 -205 10 -137Q10 -111 28 -91T74 -71Q89 -71 102 -80T116 -111Q116 -121 114 -130T107 -144T99 -154T92 -162L90 -164H91Q101 -167 151 -167Q189 -167 211 -155Q234 -144 254 -122T282 -75Q288 -56 298 -13Q311 35 311 43ZM384 328L380 339Q377 350 375 354T369 368T359 382T346 393T328 402T306 405Q262 405 221 352Q191 313 171 233T151 117Q151 38 213 38Q269 38 323 108L331 118L384 328Z"></path><path stroke-width="1" id="MJMAIN-2C" d="M78 35T78 60T94 103T137 121Q165 121 187 96T210 8Q210 -27 201 -60T180 -117T154 -158T130 -185T117 -194Q113 -194 104 -185T95 -172Q95 -168 106 -156T131 -126T157 -76T173 -3V9L172 8Q170 7 167 6T161 3T152 1T140 0Q113 0 96 17Z"></path><path stroke-width="1" id="MJMAIN-2E" d="M78 60Q78 84 95 102T138 120Q162 120 180 104T199 61Q199 36 182 18T139 0T96 17T78 60Z"></path><path stroke-width="1" id="MJMAIN-2202" d="M202 508Q179 508 169 520T158 547Q158 557 164 577T185 624T230 675T301 710L333 715H345Q378 715 384 714Q447 703 489 661T549 568T566 457Q566 362 519 240T402 53Q321 -22 223 -22Q123 -22 73 56Q42 102 42 148V159Q42 276 129 370T322 465Q383 465 414 434T455 367L458 378Q478 461 478 515Q478 603 437 639T344 676Q266 676 223 612Q264 606 264 572Q264 547 246 528T202 508ZM430 306Q430 372 401 400T333 428Q270 428 222 382Q197 354 183 323T150 221Q132 149 132 116Q132 21 232 21Q244 21 250 22Q327 35 374 112Q389 137 409 196T430 306Z"></path><path stroke-width="1" id="MJMATHI-74" d="M26 385Q19 392 19 395Q19 399 22 411T27 425Q29 430 36 430T87 431H140L159 511Q162 522 166 540T173 566T179 586T187 603T197 615T211 624T229 626Q247 625 254 615T261 596Q261 589 252 549T232 470L222 433Q222 431 272 431H323Q330 424 330 420Q330 398 317 385H210L174 240Q135 80 135 68Q135 26 162 26Q197 26 230 60T283 144Q285 150 288 151T303 153H307Q322 153 322 145Q322 142 319 133Q314 117 301 95T267 48T216 6T155 -11Q125 -11 98 4T59 56Q57 64 57 83V101L92 241Q127 382 128 383Q128 385 77 385H26Z"></path><path stroke-width="1" id="MJMATHI-78" d="M52 289Q59 331 106 386T222 442Q257 442 286 424T329 379Q371 442 430 442Q467 442 494 420T522 361Q522 332 508 314T481 292T458 288Q439 288 427 299T415 328Q415 374 465 391Q454 404 425 404Q412 404 406 402Q368 386 350 336Q290 115 290 78Q290 50 306 38T341 26Q378 26 414 59T463 140Q466 150 469 151T485 153H489Q504 153 504 145Q504 144 502 134Q486 77 440 33T333 -11Q263 -11 227 52Q186 -10 133 -10H127Q78 -10 57 16T35 71Q35 103 54 123T99 143Q142 143 142 101Q142 81 130 66T107 46T94 41L91 40Q91 39 97 36T113 29T132 26Q168 26 194 71Q203 87 217 139T245 247T261 313Q266 340 266 352Q266 380 251 392T217 404Q177 404 142 372T93 290Q91 281 88 280T72 278H58Q52 284 52 289Z"></path><path stroke-width="1" id="MJMATHI-53" d="M308 24Q367 24 416 76T466 197Q466 260 414 284Q308 311 278 321T236 341Q176 383 176 462Q176 523 208 573T273 648Q302 673 343 688T407 704H418H425Q521 704 564 640Q565 640 577 653T603 682T623 704Q624 704 627 704T632 705Q645 705 645 698T617 577T585 459T569 456Q549 456 549 465Q549 471 550 475Q550 478 551 494T553 520Q553 554 544 579T526 616T501 641Q465 662 419 662Q362 662 313 616T263 510Q263 480 278 458T319 427Q323 425 389 408T456 390Q490 379 522 342T554 242Q554 216 546 186Q541 164 528 137T492 78T426 18T332 -20Q320 -22 298 -22Q199 -22 144 33L134 44L106 13Q83 -14 78 -18T65 -22Q52 -22 52 -14Q52 -11 110 221Q112 227 130 227H143Q149 221 149 216Q149 214 148 207T144 186T142 153Q144 114 160 87T203 47T255 29T308 24Z"></path><path stroke-width="1" id="MJMATHI-3BA" d="M83 -11Q70 -11 62 -4T51 8T49 17Q49 30 96 217T147 414Q160 442 193 442Q205 441 213 435T223 422T225 412Q225 401 208 337L192 270Q193 269 208 277T235 292Q252 304 306 349T396 412T467 431Q489 431 500 420T512 391Q512 366 494 347T449 327Q430 327 418 338T405 368Q405 370 407 380L397 375Q368 360 315 315L253 266L240 257H245Q262 257 300 251T366 230Q422 203 422 150Q422 140 417 114T411 67Q411 26 437 26Q484 26 513 137Q516 149 519 151T535 153Q554 153 554 144Q554 121 527 64T457 -7Q447 -10 431 -10Q386 -10 360 17T333 90Q333 108 336 122T339 146Q339 170 320 186T271 209T222 218T185 221H180L155 122Q129 22 126 16Q113 -11 83 -11Z"></path><path stroke-width="1" id="MJMAINB-3D" d="M87 333Q64 343 64 362Q64 383 84 391Q89 393 448 393H807Q808 392 811 390T817 386T823 381T827 374T829 363Q829 345 807 333H87ZM87 109Q64 118 64 139Q64 159 86 168Q89 169 448 169H807L812 166Q816 163 818 162T823 157T827 149T829 139Q829 118 807 109H87Z"></path><path stroke-width="1" id="MJMAINB-44" d="M39 624V686H270H310H408Q500 686 545 680T638 649Q768 584 805 438Q817 388 817 338Q817 171 702 75Q628 17 515 2Q504 1 270 0H39V62H147V624H39ZM655 337Q655 370 655 390T650 442T639 494T616 540T580 580T526 607T451 623Q443 624 368 624H298V62H377H387H407Q445 62 472 65T540 83T606 129Q629 156 640 195T653 262T655 337Z"></path><path stroke-width="1" id="MJMAINB-30" d="M266 654H280H282Q500 654 524 418Q529 370 529 320Q529 125 456 52Q397 -10 287 -10Q110 -10 63 154Q45 212 45 316Q45 504 113 585Q140 618 185 636T266 654ZM374 548Q347 604 286 604Q247 604 218 575Q197 552 193 511T188 311Q188 159 196 116Q202 87 225 64T287 41Q339 41 367 87Q379 107 382 152T386 329Q386 518 374 548Z"></path><path stroke-width="1" id="MJMAIN-63" d="M370 305T349 305T313 320T297 358Q297 381 312 396Q317 401 317 402T307 404Q281 408 258 408Q209 408 178 376Q131 329 131 219Q131 137 162 90Q203 29 272 29Q313 29 338 55T374 117Q376 125 379 127T395 129H409Q415 123 415 120Q415 116 411 104T395 71T366 33T318 2T249 -11Q163 -11 99 53T34 214Q34 318 99 383T250 448T370 421T404 357Q404 334 387 320Z"></path><path stroke-width="1" id="MJMAIN-75" d="M383 58Q327 -10 256 -10H249Q124 -10 105 89Q104 96 103 226Q102 335 102 348T96 369Q86 385 36 385H25V408Q25 431 27 431L38 432Q48 433 67 434T105 436Q122 437 142 438T172 441T184 442H187V261Q188 77 190 64Q193 49 204 40Q224 26 264 26Q290 26 311 35T343 58T363 90T375 120T379 144Q379 145 379 161T380 201T380 248V315Q380 361 370 372T320 385H302V431Q304 431 378 436T457 442H464V264Q464 84 465 81Q468 61 479 55T524 46H542V0Q540 0 467 -5T390 -11H383V58Z"></path><path stroke-width="1" id="MJMAIN-6C" d="M42 46H56Q95 46 103 60V68Q103 77 103 91T103 124T104 167T104 217T104 272T104 329Q104 366 104 407T104 482T104 542T103 586T103 603Q100 622 89 628T44 637H26V660Q26 683 28 683L38 684Q48 685 67 686T104 688Q121 689 141 690T171 693T182 694H185V379Q185 62 186 60Q190 52 198 49Q219 46 247 46H263V0H255L232 1Q209 2 183 2T145 3T107 3T57 1L34 0H26V46H42Z"></path></defs></svg></div><div id="MathJax_Message" style="display: none;"></div>

        <div class="navbar navbar-default navbar-fixed-top" role="navigation">
    <div class="container">

        <!-- Collapsed navigation -->
        <div class="navbar-header">
            <!-- Expander button -->
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>

            <!-- Main title -->
            <a class="navbar-brand" href="http://mfem.org">MFEM</a>
        </div>

        <!-- Expanded navigation -->
        <div class="navbar-collapse collapse">
            <!-- Main navigation -->
            <ul class="nav navbar-nav">
            
            
            
            
            
                <li>
                    <a href="http://mfem.org/features/">Features</a>
                </li>
            
            
            
            
            
                <li class="active">
                    <a href="./">Examples</a>
                </li>
            
            
            
            
            
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">Documentation <b class="caret"></b></a>
                    <ul class="dropdown-menu">
                    
                        
                    
                        
                            <li>
                                 <a href="http://mfem.org/building/">Building MFEM</a>
                            </li>
                        
                    
                        
                            <li>
                                 <a href="http://mfem.org/serial-tutorial/">Serial Tutorial</a>
                            </li>
                        
                    
                        
                            <li>
                                 <a href="http://mfem.org/parallel-tutorial/">Parallel Tutorial</a>
                            </li>
                        
                    
                        
                            <li>
                                 <a href="http://mfem.org/fem/">Finite Elements</a>
                            </li>
                        
                    
                        
                    
                        
                    
                        
                            <li>
                                 <a href="http://mfem.org/electromagnetics/">Electromagnetics</a>
                            </li>
                        
                    
                        
                            <li>
                                 <a href="http://mfem.org/meshing/">Meshing</a>
                            </li>
                        
                    
                        
                    
                        
                            <li>
                                 <a href="http://mfem.org/performance/">Performance</a>
                            </li>
                        
                    
                        
                            <li>
                                 <a href="http://mfem.org/code-overview/">Code Overview</a>
                            </li>
                        
                    
                        
                            <li>
                                 <a href="http://mfem.org/publications/">Publications</a>
                            </li>
                        
                    
                        
                            <li>
                                 <a href="http://mfem.org/about/">About</a>
                            </li>
                        
                    
                    </ul>
                </li>
            
            
            
            
            
                <li>
                    <a href="http://mfem.org/gallery/">Gallery</a>
                </li>
            
            
            
            
            
                <li>
                    <a href="http://mfem.org/download/">Download</a>
                </li>
            
            
            
            </ul>

            <!-- Search, Navigation and Repo links -->
            <ul class="nav navbar-nav navbar-right">
                
                
                <li>
                    <a href="https://github.com/mfem/mfem">
                        
                            <i class="fa fa-github-square"></i>
                        
                        GitHub
                    </a>
                </li>
                
            </ul>
        </div>
    </div>
</div>

        <div class="container">
            
            <div class="col-md-12" role="main">

<script type="text/x-mathjax-config;executed=true">
  MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$']]}});
</script>

<script type="text/javascript" src="">
</script>

<h1 id="example-codes-and-miniapps">Example Codes and Miniapps</h1>
<p>This page provides a brief overview of MFEM's example codes and miniapps. For
detailed documentation of the MFEM sources, including the examples, see the
<a href="http://mfem.github.io/doxygen/html/index.html">online Doxygen documentation</a>,
or the <code>doc</code> directory in the distribution.</p>
<p>The goal of the example codes is to provide a step-by-step introduction to MFEM
in simple model settings. The miniapps are more complex, and are intended to be
more representative of the advanced usage of the library in physics/application
codes. We recommend that new users start with the example codes before moving to
the miniapps.</p>
<p>Clicking on any of the categories below displays examples and miniapps that contain the
described feature. <em>All examples support (arbitrarily) high-order meshes and
finite element spaces</em>.
The numerical results from the example codes can be visualized using the
GLVis visualization tool (based on MFEM). See the
<a href="http://glvis.org">GLVis website</a> for more details.</p>
<p>Users are encouraged to submit any example codes and miniapps that they have created and
would like to share. <br>
<em>Contact a member of the MFEM team to report
<a href="https://github.com/mfem/mfem/issues/new?labels=bug">bugs</a>
or post <a href="https://github.com/mfem/mfem/issues/new?labels=question">questions</a> or <a href="https://github.com/mfem/mfem/issues/new?labels=comment">comments</a></em>.</p>
<div class="row">

<p></p><div class="col-sm-6 col-md-2 small" markdown="1">
   <h5><strong>Application (PDE)</strong></h5>
   <label><input type="radio" id="all1" onchange="update(this.id);" checked="checked"> All</label><br>
   <label><input type="radio" id="laplace" onchange="update(this.id);"> Laplace</label><br>
   <label><input type="radio" id="elasticity" onchange="update(this.id);"> Elasticity</label><br>
   <label><input type="radio" id="maxwell" onchange="update(this.id);"> Electromagnetics</label><br>
   <label><input type="radio" id="graddiv" onchange="update(this.id);"> grad-div</label><br>
   <label><input type="radio" id="darcy" onchange="update(this.id);"> Darcy</label><br>
   <label><input type="radio" id="advection" onchange="update(this.id);"> Advection</label><br>
   <label><input type="radio" id="conduction" onchange="update(this.id);"> Conduction</label><br>
   <label><input type="radio" id="meshing" onchange="update(this.id);"> Meshing</label><br>
   <label><input type="radio" id="hpc" onchange="update(this.id);"> High-performance</label><br>
</div>
<div class="col-sm-6 col-md-3 small" markdown="1">
   <h5><strong>Finite Elements</strong></h5>
   <label><input type="radio" id="all2" onchange="update(this.id);" checked="checked"> All</label><br>
   <label><input type="radio" id="l2" onchange="update(this.id);"> <span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-1-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;msub&gt;&lt;mi&gt;L&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msub&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="2.637ex" height="2.409ex" viewBox="0 -777 1135.4 1037.3" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.605ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-4C" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMAIN-32" x="963" y="-213"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>L</mi><mn>2</mn></msub></math></span></span><script type="math/tex" id="MathJax-Element-1">L_2</script> discontinuous elements</label><br>
   <label><input type="radio" id="h1" onchange="update(this.id);"> <span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-2-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;msup&gt;&lt;mi&gt;H&lt;/mi&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/msup&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="3.158ex" height="2.409ex" viewBox="0 -906.2 1359.6 1037.3" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.305ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-48" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMAIN-31" x="1280" y="513"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><msup><mi>H</mi><mn>1</mn></msup></math></span></span><script type="math/tex" id="MathJax-Element-2">H^1</script> nodal elements</label><br>
   <label><input type="radio" id="hcurl" onchange="update(this.id);"> <span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-3-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;mi&gt;H&lt;/mi&gt;&lt;mo stretchy=&quot;false&quot;&gt;(&lt;/mo&gt;&lt;mi&gt;c&lt;/mi&gt;&lt;mi&gt;u&lt;/mi&gt;&lt;mi&gt;r&lt;/mi&gt;&lt;mi&gt;l&lt;/mi&gt;&lt;mo stretchy=&quot;false&quot;&gt;)&lt;/mo&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="7.951ex" height="2.709ex" viewBox="0 -841.6 3423.5 1166.5" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.755ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-48" x="0" y="0"></use><use xlink:href="#MJMAIN-28" x="888" y="0"></use><use xlink:href="#MJMATHI-63" x="1278" y="0"></use><use xlink:href="#MJMATHI-75" x="1711" y="0"></use><use xlink:href="#MJMATHI-72" x="2284" y="0"></use><use xlink:href="#MJMATHI-6C" x="2735" y="0"></use><use xlink:href="#MJMAIN-29" x="3034" y="0"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>H</mi><mo stretchy="false">(</mo><mi>c</mi><mi>u</mi><mi>r</mi><mi>l</mi><mo stretchy="false">)</mo></math></span></span><script type="math/tex" id="MathJax-Element-3">H(curl)</script> Nedelec elements</label><br>
   <label><input type="radio" id="hdiv" onchange="update(this.id);"> <span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-4-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;mi&gt;H&lt;/mi&gt;&lt;mo stretchy=&quot;false&quot;&gt;(&lt;/mo&gt;&lt;mi&gt;d&lt;/mi&gt;&lt;mi&gt;i&lt;/mi&gt;&lt;mi&gt;v&lt;/mi&gt;&lt;mo stretchy=&quot;false&quot;&gt;)&lt;/mo&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="7.019ex" height="2.709ex" viewBox="0 -841.6 3022 1166.5" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.755ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-48" x="0" y="0"></use><use xlink:href="#MJMAIN-28" x="888" y="0"></use><use xlink:href="#MJMATHI-64" x="1278" y="0"></use><use xlink:href="#MJMATHI-69" x="1801" y="0"></use><use xlink:href="#MJMATHI-76" x="2147" y="0"></use><use xlink:href="#MJMAIN-29" x="2632" y="0"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>H</mi><mo stretchy="false">(</mo><mi>d</mi><mi>i</mi><mi>v</mi><mo stretchy="false">)</mo></math></span></span><script type="math/tex" id="MathJax-Element-4">H(div)</script> Raviart-Thomas elements</label><br>
   <label><input type="radio" id="h12" onchange="update(this.id);"> <span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-5-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;msup&gt;&lt;mi&gt;H&lt;/mi&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mo&gt;&amp;#x2212;&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mo&gt;/&lt;/mo&gt;&lt;/mrow&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/mrow&gt;&lt;/msup&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="6.08ex" height="2.559ex" viewBox="0 -970.7 2617.9 1101.9" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.305ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-48" x="0" y="0"></use><g transform="translate(905,362)"><use transform="scale(0.707)" xlink:href="#MJMAIN-2212" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMAIN-31" x="778" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMAIN-2F" x="1279" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMAIN-32" x="1779" y="0"></use></g></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><msup><mi>H</mi><mrow class="MJX-TeXAtom-ORD"><mo>−</mo><mn>1</mn><mrow class="MJX-TeXAtom-ORD"><mo>/</mo></mrow><mn>2</mn></mrow></msup></math></span></span><script type="math/tex" id="MathJax-Element-5">H^{-1/2}</script> interfacial elements</label><br>
</div>
<div class="clearfix hidden-md hidden-lg"></div>
<div class="col-sm-6 col-md-3 small" markdown="1">
   <h5><strong>Discretization</strong></h5>
   <label><input type="radio" id="all3" onchange="update(this.id);" checked="checked"> All</label><br>
   <label><input type="radio" id="galerkin" onchange="update(this.id);"> Galerkin FEM</label><br>
   <label><input type="radio" id="mixed" onchange="update(this.id);"> Mixed FEM</label><br>
   <label><input type="radio" id="dg" onchange="update(this.id);"> Discontinuous Galerkin (DG)</label><br>
   <label><input type="radio" id="dpg" onchange="update(this.id);"> Discont. Petrov-Galerkin (DPG)</label><br>
   <label><input type="radio" id="hybr" onchange="update(this.id);"> Hybridization</label><br>
   <label><input type="radio" id="staticcond" onchange="update(this.id);"> Static condensation</label><br>
   <label><input type="radio" id="nurbs" onchange="update(this.id);"> Isogeometric analysis (NURBS)</label><br>
   <label><input type="radio" id="amr" onchange="update(this.id);"> Adaptive mesh refinement (AMR)</label><br>
</div>
<div class="col-sm-6 col-md-4 small" markdown="1">
   <h5><strong>Solver</strong></h5>
   <label><input type="radio" id="all4" onchange="update(this.id);" checked="checked"> All</label><br>
   <label><input type="radio" id="jacobi" onchange="update(this.id);"> Jacobi</label> <br>
   <label><input type="radio" id="gs" onchange="update(this.id);"> Gauss-Seidel</label> <br>
   <label><input type="radio" id="pcg" onchange="update(this.id);"> PCG</label> <br>
   <label><input type="radio" id="minres" onchange="update(this.id);"> MINRES</label> <br>
   <label><input type="radio" id="gmres" onchange="update(this.id);"> GMRES</label> <br>
   <label><input type="radio" id="amg" onchange="update(this.id);"> Algebraic Multigrid (BoomerAMG)</label> <br>
   <label><input type="radio" id="ams" onchange="update(this.id);"> Auxiliary-space Maxwell Solver (AMS)</label> <br>
   <label><input type="radio" id="ads" onchange="update(this.id);"> Auxiliary-space Divergence Solver (ADS)</label> <br>
   <label><input type="radio" id="superlu" onchange="update(this.id);"> SuperLU (parallel direct)</label><br>
   <label><input type="radio" id="umfpack" onchange="update(this.id);"> UMFPACK (serial direct)</label><br>
   <label><input type="radio" id="newton" onchange="update(this.id);"> Newton method (nonlinear solver)</label><br>
   <label><input type="radio" id="rk" onchange="update(this.id);"> Explicit Runge-Kutta (ODE integration)</label><br>
   <label><input type="radio" id="sdirk" onchange="update(this.id);"> Implicit Runge-Kutta (ODE integration)</label><br>
   <label><input type="radio" id="lobpcg" onchange="update(this.id);"> LOBPCG, AME (eigensolvers)</label><br>
   <label><input type="radio" id="sundials" onchange="update(this.id);"> SUNDIALS solvers</label><br>
   <label><input type="radio" id="petsc" onchange="update(this.id);"> PETSc solvers</label><br>
</div><p></p>
</div>

<hr>

<!-- ------------------------------------------------------------------------- -->

<div id="ex1" style="display: block;">

<h2 id="example-1-laplace-problem">Example 1: Laplace Problem</h2>
<p><img class="floatright" src="../doc/web/examples/ex1.png"></p>
<p>This example code demonstrates the use of MFEM to define a
simple isoparametric finite element discretization of the
Laplace problem <span class="MathJax_Preview" style="color: inherit; display: none;"></span><div class="MathJax_SVG_Display" style="text-align: center;"><span class="MathJax_SVG" id="MathJax-Element-6-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot; display=&quot;block&quot;&gt;&lt;mo&gt;&amp;#x2212;&lt;/mo&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;&amp;#x0394;&lt;/mi&gt;&lt;mi&gt;u&lt;/mi&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="9.335ex" height="2.217ex" viewBox="0 -784.8 4019.1 954.6" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.394ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAIN-2212" x="0" y="0"></use><use xlink:href="#MJMAIN-394" x="778" y="0"></use><use xlink:href="#MJMATHI-75" x="1612" y="0"></use><use xlink:href="#MJMAIN-3D" x="2462" y="0"></use><use xlink:href="#MJMAIN-31" x="3518" y="0"></use></g></svg><span class="MJX_Assistive_MathML MJX_Assistive_MathML_Block" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mo>−</mo><mi mathvariant="normal">Δ</mi><mi>u</mi><mo>=</mo><mn>1</mn></math></span></span></div><script type="math/tex; mode=display" id="MathJax-Element-6">-\Delta u = 1</script> with homogeneous Dirichlet
boundary conditions. Specifically, we discretize with the
finite element space coming from the mesh (linear by default, quadratic
for quadratic curvilinear mesh, NURBS for NURBS mesh, etc.)</p>
<p>The example highlights the use of mesh refinement, finite
element grid functions, as well as linear and bilinear forms
corresponding to the left-hand side and right-hand side of the
discrete linear system. We also cover the explicit elimination
of essential boundary conditions, static condensation, and the optional
connection to the <a href="http://glvis.org">GLVis</a> tool for visualization.</p>
<p><em>The example has a serial (<a href="https://github.com/mfem/mfem/blob/master/examples/ex1.cpp">ex1.cpp</a>),
a parallel (<a href="https://github.com/mfem/mfem/blob/master/examples/ex1p.cpp">ex1p.cpp</a>),
and HPC versions: <a href="https://github.com/mfem/mfem/blob/master/miniapps/performance/ex1.cpp">performance/ex1.cpp</a>,
<a href="https://github.com/mfem/mfem/blob/master/miniapps/performance/ex1p.cpp">performance/ex1p.cpp</a>.
It also has a PETSc modification in <a href="https://github.com/mfem/mfem/blob/master/examples/petsc">examples/petsc</a>.</em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>

<div id="ex2" style="display: block;">

<h2 id="example-2-linear-elasticity">Example 2: Linear Elasticity</h2>
<p><img class="floatright" src="../doc/web/examples/ex2.png"></p>
<p>This example code solves a simple linear elasticity problem
describing a multi-material cantilever beam.
Specifically, we approximate the weak form of
<span class="MathJax_Preview" style="color: inherit; display: none;"></span><div class="MathJax_SVG_Display" style="text-align: center;"><span class="MathJax_SVG" id="MathJax-Element-7-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot; display=&quot;block&quot;&gt;&lt;mo&gt;&amp;#x2212;&lt;/mo&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;d&lt;/mi&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;i&lt;/mi&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;v&lt;/mi&gt;&lt;/mrow&gt;&lt;mo stretchy=&quot;false&quot;&gt;(&lt;/mo&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi&gt;&amp;#x03C3;&lt;/mi&gt;&lt;/mrow&gt;&lt;mo stretchy=&quot;false&quot;&gt;(&lt;/mo&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi mathvariant=&quot;bold&quot;&gt;u&lt;/mi&gt;&lt;/mrow&gt;&lt;mo stretchy=&quot;false&quot;&gt;)&lt;/mo&gt;&lt;mo stretchy=&quot;false&quot;&gt;)&lt;/mo&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="15.669ex" height="2.737ex" viewBox="0 -840.7 6746.6 1178.2" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.784ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAIN-2212" x="0" y="0"></use><g transform="translate(778,0)"><use xlink:href="#MJMAIN-64" x="0" y="0"></use><use xlink:href="#MJMAIN-69" x="556" y="0"></use><use xlink:href="#MJMAIN-76" x="835" y="0"></use></g><use xlink:href="#MJMAIN-28" x="2142" y="0"></use><use xlink:href="#MJMATHI-3C3" x="2531" y="0"></use><use xlink:href="#MJMAIN-28" x="3104" y="0"></use><use xlink:href="#MJMAINB-75" x="3493" y="0"></use><use xlink:href="#MJMAIN-29" x="4133" y="0"></use><use xlink:href="#MJMAIN-29" x="4522" y="0"></use><use xlink:href="#MJMAIN-3D" x="5189" y="0"></use><use xlink:href="#MJMAIN-30" x="6246" y="0"></use></g></svg><span class="MJX_Assistive_MathML MJX_Assistive_MathML_Block" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mo>−</mo><mrow class="MJX-TeXAtom-ORD"><mi mathvariant="normal">d</mi><mi mathvariant="normal">i</mi><mi mathvariant="normal">v</mi></mrow><mo stretchy="false">(</mo><mrow class="MJX-TeXAtom-ORD"><mi>σ</mi></mrow><mo stretchy="false">(</mo><mrow class="MJX-TeXAtom-ORD"><mi mathvariant="bold">u</mi></mrow><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mo>=</mo><mn>0</mn></math></span></span></div><script type="math/tex; mode=display" id="MathJax-Element-7">-{\rm div}({\sigma}({\bf u})) = 0</script>
where
<span class="MathJax_Preview" style="color: inherit; display: none;"></span><div class="MathJax_SVG_Display" style="text-align: center;"><span class="MathJax_SVG" id="MathJax-Element-8-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot; display=&quot;block&quot;&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi&gt;&amp;#x03C3;&lt;/mi&gt;&lt;/mrow&gt;&lt;mo stretchy=&quot;false&quot;&gt;(&lt;/mo&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi mathvariant=&quot;bold&quot;&gt;u&lt;/mi&gt;&lt;/mrow&gt;&lt;mo stretchy=&quot;false&quot;&gt;)&lt;/mo&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mi&gt;&amp;#x03BB;&lt;/mi&gt;&lt;mspace width=&quot;thinmathspace&quot; /&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;d&lt;/mi&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;i&lt;/mi&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;v&lt;/mi&gt;&lt;/mrow&gt;&lt;mo stretchy=&quot;false&quot;&gt;(&lt;/mo&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi mathvariant=&quot;bold&quot;&gt;u&lt;/mi&gt;&lt;/mrow&gt;&lt;mo stretchy=&quot;false&quot;&gt;)&lt;/mo&gt;&lt;mspace width=&quot;thinmathspace&quot; /&gt;&lt;mi&gt;I&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mi&gt;&amp;#x03BC;&lt;/mi&gt;&lt;mspace width=&quot;thinmathspace&quot; /&gt;&lt;mo stretchy=&quot;false&quot;&gt;(&lt;/mo&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;&amp;#x2207;&lt;/mi&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi mathvariant=&quot;bold&quot;&gt;u&lt;/mi&gt;&lt;/mrow&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;&amp;#x2207;&lt;/mi&gt;&lt;msup&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi mathvariant=&quot;bold&quot;&gt;u&lt;/mi&gt;&lt;/mrow&gt;&lt;mi&gt;T&lt;/mi&gt;&lt;/msup&gt;&lt;mo stretchy=&quot;false&quot;&gt;)&lt;/mo&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="34.996ex" height="2.996ex" viewBox="0 -952.6 15067.6 1290.1" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.784ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-3C3" x="0" y="0"></use><use xlink:href="#MJMAIN-28" x="572" y="0"></use><use xlink:href="#MJMAINB-75" x="962" y="0"></use><use xlink:href="#MJMAIN-29" x="1601" y="0"></use><use xlink:href="#MJMAIN-3D" x="2268" y="0"></use><use xlink:href="#MJMATHI-3BB" x="3325" y="0"></use><g transform="translate(4075,0)"><use xlink:href="#MJMAIN-64" x="0" y="0"></use><use xlink:href="#MJMAIN-69" x="556" y="0"></use><use xlink:href="#MJMAIN-76" x="835" y="0"></use></g><use xlink:href="#MJMAIN-28" x="5438" y="0"></use><use xlink:href="#MJMAINB-75" x="5828" y="0"></use><use xlink:href="#MJMAIN-29" x="6467" y="0"></use><use xlink:href="#MJMATHI-49" x="7023" y="0"></use><use xlink:href="#MJMAIN-2B" x="7750" y="0"></use><use xlink:href="#MJMATHI-3BC" x="8751" y="0"></use><use xlink:href="#MJMAIN-28" x="9521" y="0"></use><use xlink:href="#MJMAIN-2207" x="9911" y="0"></use><use xlink:href="#MJMAINB-75" x="10744" y="0"></use><use xlink:href="#MJMAIN-2B" x="11606" y="0"></use><use xlink:href="#MJMAIN-2207" x="12606" y="0"></use><g transform="translate(13440,0)"><use xlink:href="#MJMAINB-75" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMATHI-54" x="904" y="583"></use></g><use xlink:href="#MJMAIN-29" x="14678" y="0"></use></g></svg><span class="MJX_Assistive_MathML MJX_Assistive_MathML_Block" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mrow class="MJX-TeXAtom-ORD"><mi>σ</mi></mrow><mo stretchy="false">(</mo><mrow class="MJX-TeXAtom-ORD"><mi mathvariant="bold">u</mi></mrow><mo stretchy="false">)</mo><mo>=</mo><mi>λ</mi><mspace width="thinmathspace"></mspace><mrow class="MJX-TeXAtom-ORD"><mi mathvariant="normal">d</mi><mi mathvariant="normal">i</mi><mi mathvariant="normal">v</mi></mrow><mo stretchy="false">(</mo><mrow class="MJX-TeXAtom-ORD"><mi mathvariant="bold">u</mi></mrow><mo stretchy="false">)</mo><mspace width="thinmathspace"></mspace><mi>I</mi><mo>+</mo><mi>μ</mi><mspace width="thinmathspace"></mspace><mo stretchy="false">(</mo><mi mathvariant="normal">∇</mi><mrow class="MJX-TeXAtom-ORD"><mi mathvariant="bold">u</mi></mrow><mo>+</mo><mi mathvariant="normal">∇</mi><msup><mrow class="MJX-TeXAtom-ORD"><mi mathvariant="bold">u</mi></mrow><mi>T</mi></msup><mo stretchy="false">)</mo></math></span></span></div><script type="math/tex; mode=display" id="MathJax-Element-8">{\sigma}({\bf u}) = \lambda\, {\rm div}({\bf u})\,I + \mu\,(\nabla{\bf u} + \nabla{\bf u}^T)</script>
is the stress tensor corresponding to displacement field <span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-9-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi mathvariant=&quot;bold&quot;&gt;u&lt;/mi&gt;&lt;/mrow&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.485ex" height="1.568ex" viewBox="0 -561.2 639.5 675" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.264ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAINB-75" x="0" y="0"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><mrow class="MJX-TeXAtom-ORD"><mi mathvariant="bold">u</mi></mrow></math></span></span><script type="math/tex" id="MathJax-Element-9">{\bf u}</script>, and <span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-10-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;mi&gt;&amp;#x03BB;&lt;/mi&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.355ex" height="2.087ex" viewBox="0 -784.8 583.5 898.7" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.264ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-3BB" x="0" y="0"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>λ</mi></math></span></span><script type="math/tex" id="MathJax-Element-10">\lambda</script> and <span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-11-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;mi&gt;&amp;#x03BC;&lt;/mi&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.402ex" height="1.827ex" viewBox="0 -505.2 603.5 786.8" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.654ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-3BC" x="0" y="0"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>μ</mi></math></span></span><script type="math/tex" id="MathJax-Element-11">\mu</script>
are the material Lame constants. The boundary conditions are
<span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-12-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi mathvariant=&quot;bold&quot;&gt;u&lt;/mi&gt;&lt;/mrow&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="5.746ex" height="1.957ex" viewBox="0 -728.9 2474.1 842.7" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.264ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAINB-75" x="0" y="0"></use><use xlink:href="#MJMAIN-3D" x="917" y="0"></use><use xlink:href="#MJMAIN-30" x="1973" y="0"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><mrow class="MJX-TeXAtom-ORD"><mi mathvariant="bold">u</mi></mrow><mo>=</mo><mn>0</mn></math></span></span><script type="math/tex" id="MathJax-Element-12">{\bf u}=0</script> on the fixed part of the boundary with attribute 1, and
<span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-13-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi&gt;&amp;#x03C3;&lt;/mi&gt;&lt;/mrow&gt;&lt;mo stretchy=&quot;false&quot;&gt;(&lt;/mo&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi mathvariant=&quot;bold&quot;&gt;u&lt;/mi&gt;&lt;/mrow&gt;&lt;mo stretchy=&quot;false&quot;&gt;)&lt;/mo&gt;&lt;mo&gt;&amp;#x22C5;&lt;/mo&gt;&lt;mi&gt;n&lt;/mi&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mi&gt;f&lt;/mi&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="12.075ex" height="2.737ex" viewBox="0 -840.7 5199 1178.2" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.784ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-3C3" x="0" y="0"></use><use xlink:href="#MJMAIN-28" x="572" y="0"></use><use xlink:href="#MJMAINB-75" x="962" y="0"></use><use xlink:href="#MJMAIN-29" x="1601" y="0"></use><use xlink:href="#MJMAIN-22C5" x="2213" y="0"></use><use xlink:href="#MJMATHI-6E" x="2713" y="0"></use><use xlink:href="#MJMAIN-3D" x="3592" y="0"></use><use xlink:href="#MJMATHI-66" x="4648" y="0"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><mrow class="MJX-TeXAtom-ORD"><mi>σ</mi></mrow><mo stretchy="false">(</mo><mrow class="MJX-TeXAtom-ORD"><mi mathvariant="bold">u</mi></mrow><mo stretchy="false">)</mo><mo>⋅</mo><mi>n</mi><mo>=</mo><mi>f</mi></math></span></span><script type="math/tex" id="MathJax-Element-13">{\sigma}({\bf u})\cdot n = f</script> on the remainder with <span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-14-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;mi&gt;f&lt;/mi&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.279ex" height="2.477ex" viewBox="0 -784.8 550.5 1066.4" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.654ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-66" x="0" y="0"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>f</mi></math></span></span><script type="math/tex" id="MathJax-Element-14">f</script> being
a constant pull down vector on boundary elements with attribute 2, and zero
otherwise. The geometry of the domain is assumed to be as follows:</p>
<p><img alt="" src="../doc/web/examples/ex2-domain.png"></p>
<p>The example demonstrates the use of high-order and NURBS vector
finite element spaces with the linear elasticity bilinear form,
meshes with curved elements, and the definition of piece-wise
constant and vector coefficient objects. Static condensation is
also illustrated.</p>
<p><em>The example has a serial (<a href="https://github.com/mfem/mfem/blob/master/examples/ex2.cpp">ex2.cpp</a>)
and a parallel (<a href="https://github.com/mfem/mfem/blob/master/examples/ex2p.cpp">ex2p.cpp</a>) version.
It also has a PETSc modification in <a href="https://github.com/mfem/mfem/blob/master/examples/petsc">examples/petsc</a>.
We recommend viewing Example 1 before viewing this example.</em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>

<div id="ex3" style="display: block;">

<h2 id="example-3-definite-maxwell-problem">Example 3: Definite Maxwell Problem</h2>
<p><img class="floatright" src="../doc/web/examples/ex3.png"></p>
<p>This example code solves a simple 3D electromagnetic diffusion
problem corresponding to the second order definite Maxwell
equation <span class="MathJax_Preview" style="color: inherit; display: none;"></span><div class="MathJax_SVG_Display" style="text-align: center;"><span class="MathJax_SVG" id="MathJax-Element-15-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot; display=&quot;block&quot;&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;&amp;#x2207;&lt;/mi&gt;&lt;mo&gt;&amp;#x00D7;&lt;/mo&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;&amp;#x2207;&lt;/mi&gt;&lt;mo&gt;&amp;#x00D7;&lt;/mo&gt;&lt;mspace width=&quot;thinmathspace&quot; /&gt;&lt;mi&gt;E&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mi&gt;E&lt;/mi&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mi&gt;f&lt;/mi&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="20.708ex" height="2.477ex" viewBox="0 -784.8 8916.1 1066.4" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.654ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAIN-2207" x="0" y="0"></use><use xlink:href="#MJMAIN-D7" x="1055" y="0"></use><use xlink:href="#MJMAIN-2207" x="2056" y="0"></use><use xlink:href="#MJMAIN-D7" x="3112" y="0"></use><use xlink:href="#MJMATHI-45" x="4279" y="0"></use><use xlink:href="#MJMAIN-2B" x="5266" y="0"></use><use xlink:href="#MJMATHI-45" x="6267" y="0"></use><use xlink:href="#MJMAIN-3D" x="7309" y="0"></use><use xlink:href="#MJMATHI-66" x="8365" y="0"></use></g></svg><span class="MJX_Assistive_MathML MJX_Assistive_MathML_Block" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mi mathvariant="normal">∇</mi><mo>×</mo><mi mathvariant="normal">∇</mi><mo>×</mo><mspace width="thinmathspace"></mspace><mi>E</mi><mo>+</mo><mi>E</mi><mo>=</mo><mi>f</mi></math></span></span></div><script type="math/tex; mode=display" id="MathJax-Element-15">\nabla\times\nabla\times\, E + E = f</script>
with boundary condition <span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-16-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;mi&gt;E&lt;/mi&gt;&lt;mo&gt;&amp;#x00D7;&lt;/mo&gt;&lt;mi&gt;n&lt;/mi&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="6.011ex" height="2.087ex" viewBox="0 -784.8 2587.9 898.7" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.264ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-45" x="0" y="0"></use><use xlink:href="#MJMAIN-D7" x="986" y="0"></use><use xlink:href="#MJMATHI-6E" x="1987" y="0"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>E</mi><mo>×</mo><mi>n</mi></math></span></span><script type="math/tex" id="MathJax-Element-16"> E \times n </script> = "given tangential field".
Here, we use a given exact solution <span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-17-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;mi&gt;E&lt;/mi&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.776ex" height="2.087ex" viewBox="0 -784.8 764.5 898.7" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.264ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-45" x="0" y="0"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>E</mi></math></span></span><script type="math/tex" id="MathJax-Element-17">E</script> and compute the corresponding r.h.s.
<span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-18-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;mi&gt;f&lt;/mi&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.279ex" height="2.477ex" viewBox="0 -784.8 550.5 1066.4" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.654ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-66" x="0" y="0"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>f</mi></math></span></span><script type="math/tex" id="MathJax-Element-18">f</script>. We discretize with Nedelec finite elements in 2D or 3D.</p>
<p>The example demonstrates the use of <span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-19-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;mi&gt;H&lt;/mi&gt;&lt;mo stretchy=&quot;false&quot;&gt;(&lt;/mo&gt;&lt;mi&gt;c&lt;/mi&gt;&lt;mi&gt;u&lt;/mi&gt;&lt;mi&gt;r&lt;/mi&gt;&lt;mi&gt;l&lt;/mi&gt;&lt;mo stretchy=&quot;false&quot;&gt;)&lt;/mo&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="7.951ex" height="2.737ex" viewBox="0 -840.7 3423.5 1178.2" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.784ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-48" x="0" y="0"></use><use xlink:href="#MJMAIN-28" x="888" y="0"></use><use xlink:href="#MJMATHI-63" x="1278" y="0"></use><use xlink:href="#MJMATHI-75" x="1711" y="0"></use><use xlink:href="#MJMATHI-72" x="2284" y="0"></use><use xlink:href="#MJMATHI-6C" x="2735" y="0"></use><use xlink:href="#MJMAIN-29" x="3034" y="0"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>H</mi><mo stretchy="false">(</mo><mi>c</mi><mi>u</mi><mi>r</mi><mi>l</mi><mo stretchy="false">)</mo></math></span></span><script type="math/tex" id="MathJax-Element-19">H(curl)</script> finite element
spaces with the curl-curl and the (vector finite element) mass
bilinear form, as well as the computation of discretization
error when the exact solution is known. Static condensation is
also illustrated.</p>
<p><em>The example has a serial (<a href="https://github.com/mfem/mfem/blob/master/examples/ex3.cpp">ex3.cpp</a>)
and a parallel (<a href="https://github.com/mfem/mfem/blob/master/examples/ex3p.cpp">ex3p.cpp</a>) version.
It also has a PETSc modification in <a href="https://github.com/mfem/mfem/blob/master/examples/petsc">examples/petsc</a>.
We recommend viewing examples 1-2 before viewing this example.</em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>

<div id="ex4" style="display: block;">

<h2 id="example-4-grad-div-problem">Example 4: Grad-div Problem</h2>
<p><img class="floatright" src="../doc/web/examples/ex4.png"></p>
<p>This example code solves a simple 2D/3D <span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-20-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;mi&gt;H&lt;/mi&gt;&lt;mo stretchy=&quot;false&quot;&gt;(&lt;/mo&gt;&lt;mi&gt;d&lt;/mi&gt;&lt;mi&gt;i&lt;/mi&gt;&lt;mi&gt;v&lt;/mi&gt;&lt;mo stretchy=&quot;false&quot;&gt;)&lt;/mo&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="7.019ex" height="2.737ex" viewBox="0 -840.7 3022 1178.2" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.784ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-48" x="0" y="0"></use><use xlink:href="#MJMAIN-28" x="888" y="0"></use><use xlink:href="#MJMATHI-64" x="1278" y="0"></use><use xlink:href="#MJMATHI-69" x="1801" y="0"></use><use xlink:href="#MJMATHI-76" x="2147" y="0"></use><use xlink:href="#MJMAIN-29" x="2632" y="0"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>H</mi><mo stretchy="false">(</mo><mi>d</mi><mi>i</mi><mi>v</mi><mo stretchy="false">)</mo></math></span></span><script type="math/tex" id="MathJax-Element-20">H(div)</script>
diffusion problem corresponding to the second order definite equation
<span class="MathJax_Preview" style="color: inherit; display: none;"></span><div class="MathJax_SVG_Display" style="text-align: center;"><span class="MathJax_SVG" id="MathJax-Element-21-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot; display=&quot;block&quot;&gt;&lt;mo&gt;&amp;#x2212;&lt;/mo&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;g&lt;/mi&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;r&lt;/mi&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;a&lt;/mi&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;d&lt;/mi&gt;&lt;/mrow&gt;&lt;mo stretchy=&quot;false&quot;&gt;(&lt;/mo&gt;&lt;mi&gt;&amp;#x03B1;&lt;/mi&gt;&lt;mspace width=&quot;thinmathspace&quot; /&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;d&lt;/mi&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;i&lt;/mi&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;v&lt;/mi&gt;&lt;/mrow&gt;&lt;mo stretchy=&quot;false&quot;&gt;(&lt;/mo&gt;&lt;mi&gt;F&lt;/mi&gt;&lt;mo stretchy=&quot;false&quot;&gt;)&lt;/mo&gt;&lt;mo stretchy=&quot;false&quot;&gt;)&lt;/mo&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mi&gt;&amp;#x03B2;&lt;/mi&gt;&lt;mi&gt;F&lt;/mi&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mi&gt;f&lt;/mi&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="27.028ex" height="2.737ex" viewBox="0 -840.7 11637.2 1178.2" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.784ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAIN-2212" x="0" y="0"></use><g transform="translate(778,0)"><use xlink:href="#MJMAIN-67" x="0" y="0"></use><use xlink:href="#MJMAIN-72" x="500" y="0"></use><use xlink:href="#MJMAIN-61" x="893" y="0"></use><use xlink:href="#MJMAIN-64" x="1393" y="0"></use></g><use xlink:href="#MJMAIN-28" x="2728" y="0"></use><use xlink:href="#MJMATHI-3B1" x="3118" y="0"></use><g transform="translate(3925,0)"><use xlink:href="#MJMAIN-64" x="0" y="0"></use><use xlink:href="#MJMAIN-69" x="556" y="0"></use><use xlink:href="#MJMAIN-76" x="835" y="0"></use></g><use xlink:href="#MJMAIN-28" x="5288" y="0"></use><use xlink:href="#MJMATHI-46" x="5678" y="0"></use><use xlink:href="#MJMAIN-29" x="6427" y="0"></use><use xlink:href="#MJMAIN-29" x="6817" y="0"></use><use xlink:href="#MJMAIN-2B" x="7428" y="0"></use><use xlink:href="#MJMATHI-3B2" x="8429" y="0"></use><use xlink:href="#MJMATHI-46" x="9003" y="0"></use><use xlink:href="#MJMAIN-3D" x="10030" y="0"></use><use xlink:href="#MJMATHI-66" x="11086" y="0"></use></g></svg><span class="MJX_Assistive_MathML MJX_Assistive_MathML_Block" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mo>−</mo><mrow class="MJX-TeXAtom-ORD"><mi mathvariant="normal">g</mi><mi mathvariant="normal">r</mi><mi mathvariant="normal">a</mi><mi mathvariant="normal">d</mi></mrow><mo stretchy="false">(</mo><mi>α</mi><mspace width="thinmathspace"></mspace><mrow class="MJX-TeXAtom-ORD"><mi mathvariant="normal">d</mi><mi mathvariant="normal">i</mi><mi mathvariant="normal">v</mi></mrow><mo stretchy="false">(</mo><mi>F</mi><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mo>+</mo><mi>β</mi><mi>F</mi><mo>=</mo><mi>f</mi></math></span></span></div><script type="math/tex; mode=display" id="MathJax-Element-21">-{\rm grad}(\alpha\,{\rm div}(F)) + \beta F = f</script>
with boundary condition <span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-22-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;mi&gt;F&lt;/mi&gt;&lt;mo&gt;&amp;#x22C5;&lt;/mo&gt;&lt;mi&gt;n&lt;/mi&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="4.815ex" height="2.087ex" viewBox="0 -784.8 2072.9 898.7" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.264ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-46" x="0" y="0"></use><use xlink:href="#MJMAIN-22C5" x="971" y="0"></use><use xlink:href="#MJMATHI-6E" x="1472" y="0"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>F</mi><mo>⋅</mo><mi>n</mi></math></span></span><script type="math/tex" id="MathJax-Element-22">F \cdot n</script> = "given normal field".
Here we use a given exact solution <span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-23-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;mi&gt;F&lt;/mi&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.741ex" height="2.087ex" viewBox="0 -784.8 749.5 898.7" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.264ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-46" x="0" y="0"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>F</mi></math></span></span><script type="math/tex" id="MathJax-Element-23">F</script> and compute the corresponding
right hand side <span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-24-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;mi&gt;f&lt;/mi&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.279ex" height="2.477ex" viewBox="0 -784.8 550.5 1066.4" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.654ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-66" x="0" y="0"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>f</mi></math></span></span><script type="math/tex" id="MathJax-Element-24">f</script>.  We discretize with the Raviart-Thomas finite elements.</p>
<p>The example demonstrates the use of <span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-25-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;mi&gt;H&lt;/mi&gt;&lt;mo stretchy=&quot;false&quot;&gt;(&lt;/mo&gt;&lt;mi&gt;d&lt;/mi&gt;&lt;mi&gt;i&lt;/mi&gt;&lt;mi&gt;v&lt;/mi&gt;&lt;mo stretchy=&quot;false&quot;&gt;)&lt;/mo&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="7.019ex" height="2.737ex" viewBox="0 -840.7 3022 1178.2" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.784ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-48" x="0" y="0"></use><use xlink:href="#MJMAIN-28" x="888" y="0"></use><use xlink:href="#MJMATHI-64" x="1278" y="0"></use><use xlink:href="#MJMATHI-69" x="1801" y="0"></use><use xlink:href="#MJMATHI-76" x="2147" y="0"></use><use xlink:href="#MJMAIN-29" x="2632" y="0"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>H</mi><mo stretchy="false">(</mo><mi>d</mi><mi>i</mi><mi>v</mi><mo stretchy="false">)</mo></math></span></span><script type="math/tex" id="MathJax-Element-25">H(div)</script>
finite element spaces with the grad-div and <span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-26-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;mi&gt;H&lt;/mi&gt;&lt;mo stretchy=&quot;false&quot;&gt;(&lt;/mo&gt;&lt;mi&gt;d&lt;/mi&gt;&lt;mi&gt;i&lt;/mi&gt;&lt;mi&gt;v&lt;/mi&gt;&lt;mo stretchy=&quot;false&quot;&gt;)&lt;/mo&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="7.019ex" height="2.737ex" viewBox="0 -840.7 3022 1178.2" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.784ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-48" x="0" y="0"></use><use xlink:href="#MJMAIN-28" x="888" y="0"></use><use xlink:href="#MJMATHI-64" x="1278" y="0"></use><use xlink:href="#MJMATHI-69" x="1801" y="0"></use><use xlink:href="#MJMATHI-76" x="2147" y="0"></use><use xlink:href="#MJMAIN-29" x="2632" y="0"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>H</mi><mo stretchy="false">(</mo><mi>d</mi><mi>i</mi><mi>v</mi><mo stretchy="false">)</mo></math></span></span><script type="math/tex" id="MathJax-Element-26">H(div)</script>
vector finite element mass bilinear form, as well as the computation of discretization
error when the exact solution is known.
Bilinear form hybridization and static condensation are also illustrated.</p>
<p><em>The example has a serial (<a href="https://github.com/mfem/mfem/blob/master/examples/ex4.cpp">ex4.cpp</a>)
and a parallel (<a href="https://github.com/mfem/mfem/blob/master/examples/ex4p.cpp">ex4p.cpp</a>) version.
It also has a PETSc modification in <a href="https://github.com/mfem/mfem/blob/master/examples/petsc">examples/petsc</a>.
We recommend viewing examples 1-3 before viewing this example.</em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>

<div id="ex5" style="display: block;">

<h2 id="example-5-darcy-problem">Example 5: Darcy Problem</h2>
<p><img class="floatright" src="../doc/web/examples/ex5.png"></p>
<p>This example code solves a simple 2D/3D mixed Darcy problem
corresponding to the saddle point system
<span class="MathJax_Preview" style="color: inherit; display: none;"></span><div class="MathJax_SVG_Display" style="text-align: center;"><span class="MathJax_SVG" id="MathJax-Element-27-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot; display=&quot;block&quot;&gt;&lt;mtable columnalign=&quot;right center left&quot; rowspacing=&quot;4pt&quot; columnspacing=&quot;1em&quot;&gt;&lt;mtr&gt;&lt;mtd&gt;&lt;mi&gt;k&lt;/mi&gt;&lt;mspace width=&quot;thinmathspace&quot; /&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi mathvariant=&quot;bold&quot;&gt;u&lt;/mi&gt;&lt;/mrow&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;g&lt;/mi&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;r&lt;/mi&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;a&lt;/mi&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;d&lt;/mi&gt;&lt;/mrow&gt;&lt;mspace width=&quot;thinmathspace&quot; /&gt;&lt;mi&gt;p&lt;/mi&gt;&lt;/mtd&gt;&lt;mtd&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;/mtd&gt;&lt;mtd&gt;&lt;mi&gt;f&lt;/mi&gt;&lt;/mtd&gt;&lt;/mtr&gt;&lt;mtr&gt;&lt;mtd&gt;&lt;mo&gt;&amp;#x2212;&lt;/mo&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;d&lt;/mi&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;i&lt;/mi&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;v&lt;/mi&gt;&lt;/mrow&gt;&lt;mspace width=&quot;thinmathspace&quot; /&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi mathvariant=&quot;bold&quot;&gt;u&lt;/mi&gt;&lt;/mrow&gt;&lt;/mtd&gt;&lt;mtd&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;/mtd&gt;&lt;mtd&gt;&lt;mi&gt;g&lt;/mi&gt;&lt;/mtd&gt;&lt;/mtr&gt;&lt;/mtable&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="20.486ex" height="6.113ex" viewBox="0 -1567.7 8820.4 2632.1" role="img" focusable="false" aria-hidden="true" style="vertical-align: -2.472ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><g transform="translate(167,0)"><g transform="translate(-14,0)"><g transform="translate(0,656)"><use xlink:href="#MJMATHI-6B" x="0" y="0"></use><use xlink:href="#MJMAINB-75" x="688" y="0"></use><use xlink:href="#MJMAIN-2B" x="1549" y="0"></use><g transform="translate(2550,0)"><use xlink:href="#MJMAIN-67" x="0" y="0"></use><use xlink:href="#MJMAIN-72" x="500" y="0"></use><use xlink:href="#MJMAIN-61" x="893" y="0"></use><use xlink:href="#MJMAIN-64" x="1393" y="0"></use></g><use xlink:href="#MJMATHI-70" x="4667" y="0"></use></g><g transform="translate(2222,-751)"><use xlink:href="#MJMAIN-2212" x="0" y="0"></use><g transform="translate(778,0)"><use xlink:href="#MJMAIN-64" x="0" y="0"></use><use xlink:href="#MJMAIN-69" x="556" y="0"></use><use xlink:href="#MJMAIN-76" x="835" y="0"></use></g><use xlink:href="#MJMAINB-75" x="2308" y="0"></use></g></g><g transform="translate(6157,0)"><use xlink:href="#MJMAIN-3D" x="0" y="656"></use><use xlink:href="#MJMAIN-3D" x="0" y="-751"></use></g><g transform="translate(7935,0)"><use xlink:href="#MJMATHI-66" x="0" y="656"></use><use xlink:href="#MJMATHI-67" x="0" y="-751"></use></g></g></g></svg><span class="MJX_Assistive_MathML MJX_Assistive_MathML_Block" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mtable columnalign="right center left" rowspacing="4pt" columnspacing="1em"><mtr><mtd><mi>k</mi><mspace width="thinmathspace"></mspace><mrow class="MJX-TeXAtom-ORD"><mi mathvariant="bold">u</mi></mrow><mo>+</mo><mrow class="MJX-TeXAtom-ORD"><mi mathvariant="normal">g</mi><mi mathvariant="normal">r</mi><mi mathvariant="normal">a</mi><mi mathvariant="normal">d</mi></mrow><mspace width="thinmathspace"></mspace><mi>p</mi></mtd><mtd><mo>=</mo></mtd><mtd><mi>f</mi></mtd></mtr><mtr><mtd><mo>−</mo><mrow class="MJX-TeXAtom-ORD"><mi mathvariant="normal">d</mi><mi mathvariant="normal">i</mi><mi mathvariant="normal">v</mi></mrow><mspace width="thinmathspace"></mspace><mrow class="MJX-TeXAtom-ORD"><mi mathvariant="bold">u</mi></mrow></mtd><mtd><mo>=</mo></mtd><mtd><mi>g</mi></mtd></mtr></mtable></math></span></span></div><script type="math/tex; mode=display" id="MathJax-Element-27"> \begin{array}{rcl}
   k\,{\bf u} + {\rm grad}\,p &=& f \\
   -{\rm div}\,{\bf u} &=& g
\end{array} </script>
with natural boundary condition <span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-28-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;mo&gt;&amp;#x2212;&lt;/mo&gt;&lt;mi&gt;p&lt;/mi&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="5.431ex" height="2.217ex" viewBox="0 -673 2338.3 954.6" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.654ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAIN-2212" x="0" y="0"></use><use xlink:href="#MJMATHI-70" x="778" y="0"></use><use xlink:href="#MJMAIN-3D" x="1559" y="0"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><mo>−</mo><mi>p</mi><mo>=</mo></math></span></span><script type="math/tex" id="MathJax-Element-28">-p = </script> "given pressure".
Here we use a given exact solution <span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-29-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;mo stretchy=&quot;false&quot;&gt;(&lt;/mo&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi mathvariant=&quot;bold&quot;&gt;u&lt;/mi&gt;&lt;/mrow&gt;&lt;mo&gt;,&lt;/mo&gt;&lt;mi&gt;p&lt;/mi&gt;&lt;mo stretchy=&quot;false&quot;&gt;)&lt;/mo&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="5.498ex" height="2.737ex" viewBox="0 -840.7 2367.2 1178.2" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.784ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAIN-28" x="0" y="0"></use><use xlink:href="#MJMAINB-75" x="389" y="0"></use><use xlink:href="#MJMAIN-2C" x="1029" y="0"></use><use xlink:href="#MJMATHI-70" x="1474" y="0"></use><use xlink:href="#MJMAIN-29" x="1977" y="0"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><mo stretchy="false">(</mo><mrow class="MJX-TeXAtom-ORD"><mi mathvariant="bold">u</mi></mrow><mo>,</mo><mi>p</mi><mo stretchy="false">)</mo></math></span></span><script type="math/tex" id="MathJax-Element-29">({\bf u},p)</script> and compute the
corresponding right hand side <span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-30-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;mo stretchy=&quot;false&quot;&gt;(&lt;/mo&gt;&lt;mi&gt;f&lt;/mi&gt;&lt;mo&gt;,&lt;/mo&gt;&lt;mi&gt;g&lt;/mi&gt;&lt;mo stretchy=&quot;false&quot;&gt;)&lt;/mo&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="5.238ex" height="2.737ex" viewBox="0 -840.7 2255.2 1178.2" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.784ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAIN-28" x="0" y="0"></use><use xlink:href="#MJMATHI-66" x="389" y="0"></use><use xlink:href="#MJMAIN-2C" x="940" y="0"></use><use xlink:href="#MJMATHI-67" x="1385" y="0"></use><use xlink:href="#MJMAIN-29" x="1865" y="0"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><mo stretchy="false">(</mo><mi>f</mi><mo>,</mo><mi>g</mi><mo stretchy="false">)</mo></math></span></span><script type="math/tex" id="MathJax-Element-30">(f, g)</script>. We discretize with Raviart-Thomas
finite elements (velocity <span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-31-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;mi mathvariant=&quot;bold&quot;&gt;u&lt;/mi&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.485ex" height="1.568ex" viewBox="0 -561.2 639.5 675" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.264ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAINB-75" x="0" y="0"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi mathvariant="bold">u</mi></math></span></span><script type="math/tex" id="MathJax-Element-31">\bf u</script>) and piecewise discontinuous
polynomials (pressure <span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-32-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;mi&gt;p&lt;/mi&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.259ex" height="1.827ex" viewBox="-38.5 -505.2 542 786.8" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.654ex; margin-left: -0.089ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-70" x="0" y="0"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>p</mi></math></span></span><script type="math/tex" id="MathJax-Element-32">p</script>).</p>
<p>The example demonstrates the use of the BlockMatrix and BlockOperator
classes, as well as the collective saving of several grid functions in
a <a href="http://visit.llnl.gov">VisIt</a> visualization format.</p>
<p><em>The example has a serial (<a href="https://github.com/mfem/mfem/blob/master/examples/ex5.cpp">ex5.cpp</a>)
and a parallel (<a href="https://github.com/mfem/mfem/blob/master/examples/ex5p.cpp">ex5p.cpp</a>) version.
It also has a PETSc modification in <a href="https://github.com/mfem/mfem/blob/master/examples/petsc">examples/petsc</a>.
We recommend viewing examples 1-4 before viewing this example.</em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>

<div id="ex6" style="display: block;">

<h2 id="example-6-laplace-problem-with-amr">Example 6: Laplace Problem with AMR</h2>
<p><img class="floatright" src="../doc/web/examples/ex6.png"></p>
<p>This is a version of Example 1 with a simple adaptive mesh
refinement loop. The problem being solved is again the Laplace
equation <span class="MathJax_Preview" style="color: inherit; display: none;"></span><div class="MathJax_SVG_Display" style="text-align: center;"><span class="MathJax_SVG" id="MathJax-Element-33-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot; display=&quot;block&quot;&gt;&lt;mo&gt;&amp;#x2212;&lt;/mo&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;&amp;#x0394;&lt;/mi&gt;&lt;mi&gt;u&lt;/mi&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="9.335ex" height="2.217ex" viewBox="0 -784.8 4019.1 954.6" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.394ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAIN-2212" x="0" y="0"></use><use xlink:href="#MJMAIN-394" x="778" y="0"></use><use xlink:href="#MJMATHI-75" x="1612" y="0"></use><use xlink:href="#MJMAIN-3D" x="2462" y="0"></use><use xlink:href="#MJMAIN-31" x="3518" y="0"></use></g></svg><span class="MJX_Assistive_MathML MJX_Assistive_MathML_Block" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mo>−</mo><mi mathvariant="normal">Δ</mi><mi>u</mi><mo>=</mo><mn>1</mn></math></span></span></div><script type="math/tex; mode=display" id="MathJax-Element-33">-\Delta u = 1</script> with homogeneous Dirichlet boundary
conditions. The problem is solved on a sequence of meshes which
are locally refined in a conforming (triangles, tetrahedrons)
or non-conforming (quadrilateral, hexahedrons) manner according
to a simple ZZ error estimator.</p>
<p>The example demonstrates MFEM's capability to work with both
conforming and nonconforming refinements, in 2D and 3D, on
linear, curved and surface meshes. Interpolation of functions
from coarse to fine meshes, as well as persistent <a href="http://glvis.org">GLVis</a>
visualization are also illustrated.</p>
<p><em>The example has a serial (<a href="https://github.com/mfem/mfem/blob/master/examples/ex6.cpp">ex6.cpp</a>)
and a parallel (<a href="https://github.com/mfem/mfem/blob/master/examples/ex6p.cpp">ex6p.cpp</a>) version.
It also has a PETSc modification in <a href="https://github.com/mfem/mfem/blob/master/examples/petsc">examples/petsc</a>.
We recommend viewing Example 1 before viewing this example.</em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>

<div id="ex7" style="display: block;">

<h2 id="example-7-surface-meshes">Example 7: Surface Meshes</h2>
<p><img class="floatright" src="../doc/web/examples/ex7.png"></p>
<p>This example code demonstrates the use of MFEM to define a
triangulation of a unit sphere and a simple isoparametric
finite element discretization of the Laplace problem with mass
term, <span class="MathJax_Preview" style="color: inherit; display: none;"></span><div class="MathJax_SVG_Display" style="text-align: center;"><span class="MathJax_SVG" id="MathJax-Element-34-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot; display=&quot;block&quot;&gt;&lt;mo&gt;&amp;#x2212;&lt;/mo&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;&amp;#x0394;&lt;/mi&gt;&lt;mi&gt;u&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mi&gt;u&lt;/mi&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mi&gt;f&lt;/mi&gt;&lt;mo&gt;.&lt;/mo&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="14.268ex" height="2.477ex" viewBox="0 -784.8 6143 1066.4" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.654ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAIN-2212" x="0" y="0"></use><use xlink:href="#MJMAIN-394" x="778" y="0"></use><use xlink:href="#MJMATHI-75" x="1612" y="0"></use><use xlink:href="#MJMAIN-2B" x="2406" y="0"></use><use xlink:href="#MJMATHI-75" x="3407" y="0"></use><use xlink:href="#MJMAIN-3D" x="4257" y="0"></use><use xlink:href="#MJMATHI-66" x="5313" y="0"></use><use xlink:href="#MJMAIN-2E" x="5864" y="0"></use></g></svg><span class="MJX_Assistive_MathML MJX_Assistive_MathML_Block" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mo>−</mo><mi mathvariant="normal">Δ</mi><mi>u</mi><mo>+</mo><mi>u</mi><mo>=</mo><mi>f</mi><mo>.</mo></math></span></span></div><script type="math/tex; mode=display" id="MathJax-Element-34">-\Delta u + u = f.</script></p>
<p>The example highlights mesh generation, the use of mesh
refinement, high-order meshes and finite elements, as well as
surface-based linear and bilinear forms corresponding to the
left-hand side and right-hand side of the discrete linear
system. Simple local mesh refinement is also demonstrated.</p>
<p><em>The example has a serial (<a href="https://github.com/mfem/mfem/blob/master/examples/ex7.cpp">ex7.cpp</a>)
and a parallel (<a href="https://github.com/mfem/mfem/blob/master/examples/ex7p.cpp">ex7p.cpp</a>) version.
We recommend viewing Example 1 before viewing this example.</em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>

<div id="ex8" style="display: block;">

<h2 id="example-8-dpg-for-the-laplace-problem">Example 8: DPG for the Laplace Problem</h2>
<p><img class="floatright" src="../doc/web/examples/ex8.png"></p>
<p>This example code demonstrates the use of the Discontinuous
Petrov-Galerkin (DPG) method in its primal 2x2 block form as a
simple finite element discretization of the Laplace problem
<span class="MathJax_Preview" style="color: inherit; display: none;"></span><div class="MathJax_SVG_Display" style="text-align: center;"><span class="MathJax_SVG" id="MathJax-Element-35-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot; display=&quot;block&quot;&gt;&lt;mo&gt;&amp;#x2212;&lt;/mo&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;&amp;#x0394;&lt;/mi&gt;&lt;mi&gt;u&lt;/mi&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mi&gt;f&lt;/mi&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="9.451ex" height="2.477ex" viewBox="0 -784.8 4069.1 1066.4" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.654ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAIN-2212" x="0" y="0"></use><use xlink:href="#MJMAIN-394" x="778" y="0"></use><use xlink:href="#MJMATHI-75" x="1612" y="0"></use><use xlink:href="#MJMAIN-3D" x="2462" y="0"></use><use xlink:href="#MJMATHI-66" x="3518" y="0"></use></g></svg><span class="MJX_Assistive_MathML MJX_Assistive_MathML_Block" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mo>−</mo><mi mathvariant="normal">Δ</mi><mi>u</mi><mo>=</mo><mi>f</mi></math></span></span></div><script type="math/tex; mode=display" id="MathJax-Element-35">-\Delta u = f</script> with homogeneous Dirichlet boundary conditions. We
use high-order continuous trial space, a high-order interfacial
(trace) space, and a high-order discontinuous test space
defining a local dual (<span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-36-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;msup&gt;&lt;mi&gt;H&lt;/mi&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mo&gt;&amp;#x2212;&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&lt;/msup&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="4.436ex" height="2.347ex" viewBox="0 -896.7 1910 1010.5" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.264ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-48" x="0" y="0"></use><g transform="translate(905,362)"><use transform="scale(0.707)" xlink:href="#MJMAIN-2212" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMAIN-31" x="778" y="0"></use></g></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><msup><mi>H</mi><mrow class="MJX-TeXAtom-ORD"><mo>−</mo><mn>1</mn></mrow></msup></math></span></span><script type="math/tex" id="MathJax-Element-36">H^{-1}</script>) norm.
We use the primal form of DPG, see
<a href="http://dx.doi.org/10.1016/j.camwa.2013.06.029">"A primal DPG method without a first-order reformulation"</a>,
Demkowicz and Gopalakrishnan, CAM 2013.</p>
<p>The example highlights the use of interfacial (trace) finite
elements and spaces, trace face integrators and the definition
of block operators and preconditioners.</p>
<p><em>The example has a serial (<a href="https://github.com/mfem/mfem/blob/master/examples/ex8.cpp">ex8.cpp</a>)
and a parallel (<a href="https://github.com/mfem/mfem/blob/master/examples/ex8p.cpp">ex8p.cpp</a>) version.
We recommend viewing examples 1-5 before viewing this example.</em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>

<div id="ex9" style="display: block;">

<h2 id="example-9-dg-advection">Example 9: DG Advection</h2>
<p><img class="floatright" src="../doc/web/examples/ex9.png"></p>
<p>This example code solves the time-dependent advection equation
<span class="MathJax_Preview" style="color: inherit; display: none;"></span><div class="MathJax_SVG_Display" style="text-align: center;"><span class="MathJax_SVG" id="MathJax-Element-37-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot; display=&quot;block&quot;&gt;&lt;mfrac&gt;&lt;mrow&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;&amp;#x2202;&lt;/mi&gt;&lt;mi&gt;u&lt;/mi&gt;&lt;/mrow&gt;&lt;mrow&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;&amp;#x2202;&lt;/mi&gt;&lt;mi&gt;t&lt;/mi&gt;&lt;/mrow&gt;&lt;/mfrac&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mi&gt;v&lt;/mi&gt;&lt;mo&gt;&amp;#x22C5;&lt;/mo&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;&amp;#x2207;&lt;/mi&gt;&lt;mi&gt;u&lt;/mi&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;mo&gt;,&lt;/mo&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="17.304ex" height="5.204ex" viewBox="0 -1455.8 7450.4 2240.6" role="img" focusable="false" aria-hidden="true" style="vertical-align: -1.823ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><g transform="translate(120,0)"><rect stroke="none" width="1260" height="60" x="0" y="220"></rect><g transform="translate(60,676)"><use xlink:href="#MJMAIN-2202" x="0" y="0"></use><use xlink:href="#MJMATHI-75" x="567" y="0"></use></g><g transform="translate(165,-696)"><use xlink:href="#MJMAIN-2202" x="0" y="0"></use><use xlink:href="#MJMATHI-74" x="567" y="0"></use></g></g><use xlink:href="#MJMAIN-2B" x="1722" y="0"></use><use xlink:href="#MJMATHI-76" x="2722" y="0"></use><use xlink:href="#MJMAIN-22C5" x="3430" y="0"></use><use xlink:href="#MJMAIN-2207" x="3931" y="0"></use><use xlink:href="#MJMATHI-75" x="4764" y="0"></use><use xlink:href="#MJMAIN-3D" x="5615" y="0"></use><use xlink:href="#MJMAIN-30" x="6671" y="0"></use><use xlink:href="#MJMAIN-2C" x="7171" y="0"></use></g></svg><span class="MJX_Assistive_MathML MJX_Assistive_MathML_Block" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mfrac><mrow><mi mathvariant="normal">∂</mi><mi>u</mi></mrow><mrow><mi mathvariant="normal">∂</mi><mi>t</mi></mrow></mfrac><mo>+</mo><mi>v</mi><mo>⋅</mo><mi mathvariant="normal">∇</mi><mi>u</mi><mo>=</mo><mn>0</mn><mo>,</mo></math></span></span></div><script type="math/tex; mode=display" id="MathJax-Element-37">\frac{\partial u}{\partial t} + v \cdot \nabla u = 0,</script> where <span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-38-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;mi&gt;v&lt;/mi&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.128ex" height="1.438ex" viewBox="0 -505.2 485.5 619.1" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.264ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-76" x="0" y="0"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>v</mi></math></span></span><script type="math/tex" id="MathJax-Element-38">v</script> is a given fluid
velocity, and <span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-39-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;msub&gt;&lt;mi&gt;u&lt;/mi&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;/msub&gt;&lt;mo stretchy=&quot;false&quot;&gt;(&lt;/mo&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mo stretchy=&quot;false&quot;&gt;)&lt;/mo&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mi&gt;u&lt;/mi&gt;&lt;mo stretchy=&quot;false&quot;&gt;(&lt;/mo&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;mo&gt;,&lt;/mo&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mo stretchy=&quot;false&quot;&gt;)&lt;/mo&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="15.286ex" height="2.737ex" viewBox="0 -840.7 6581.6 1178.2" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.784ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-75" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMAIN-30" x="809" y="-213"></use><use xlink:href="#MJMAIN-28" x="1026" y="0"></use><use xlink:href="#MJMATHI-78" x="1415" y="0"></use><use xlink:href="#MJMAIN-29" x="1988" y="0"></use><use xlink:href="#MJMAIN-3D" x="2655" y="0"></use><use xlink:href="#MJMATHI-75" x="3711" y="0"></use><use xlink:href="#MJMAIN-28" x="4284" y="0"></use><use xlink:href="#MJMAIN-30" x="4673" y="0"></use><use xlink:href="#MJMAIN-2C" x="5174" y="0"></use><use xlink:href="#MJMATHI-78" x="5619" y="0"></use><use xlink:href="#MJMAIN-29" x="6192" y="0"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>u</mi><mn>0</mn></msub><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo><mo>=</mo><mi>u</mi><mo stretchy="false">(</mo><mn>0</mn><mo>,</mo><mi>x</mi><mo stretchy="false">)</mo></math></span></span><script type="math/tex" id="MathJax-Element-39">u_0(x)=u(0,x)</script> is a given initial condition.</p>
<p>The example demonstrates the use of Discontinuous Galerkin (DG) bilinear forms
in MFEM (face integrators), the use of explicit ODE time integrators, the
definition of periodic boundary conditions through periodic meshes, as well as
the use of <a href="http://glvis.org">GLVis</a> for persistent
visualization of a time-evolving solution. The saving of time-dependent data
files for external visualization with <a href="http://visit.llnl.gov">VisIt</a>
is also illustrated.</p>
<p><em>The example has a serial (<a href="https://github.com/mfem/mfem/blob/master/examples/ex9.cpp">ex9.cpp</a>)
and a parallel (<a href="https://github.com/mfem/mfem/blob/master/examples/ex9p.cpp">ex9p.cpp</a>) version.
It also has a SUNDIALS modification in <a href="https://github.com/mfem/mfem/blob/master/examples/sundials">examples/sundials</a>
and a PETSc modification in <a href="https://github.com/mfem/mfem/blob/master/examples/petsc">examples/petsc</a>.</em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>

<div id="ex10" style="display: block;">

<h2 id="example-10-nonlinear-elasticity">Example 10: Nonlinear Elasticity</h2>
<p><img class="floatright" src="../doc/web/examples/ex10.png"></p>
<p>This example solves a time dependent nonlinear elasticity problem of the form
<span class="MathJax_Preview" style="color: inherit; display: none;"></span><div class="MathJax_SVG_Display" style="text-align: center;"><span class="MathJax_SVG" id="MathJax-Element-40-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot; display=&quot;block&quot;&gt;&lt;mfrac&gt;&lt;mrow&gt;&lt;mi&gt;d&lt;/mi&gt;&lt;mi&gt;v&lt;/mi&gt;&lt;/mrow&gt;&lt;mrow&gt;&lt;mi&gt;d&lt;/mi&gt;&lt;mi&gt;t&lt;/mi&gt;&lt;/mrow&gt;&lt;/mfrac&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mi&gt;H&lt;/mi&gt;&lt;mo stretchy=&quot;false&quot;&gt;(&lt;/mo&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;mo stretchy=&quot;false&quot;&gt;)&lt;/mo&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mi&gt;S&lt;/mi&gt;&lt;mi&gt;v&lt;/mi&gt;&lt;mspace width=&quot;thinmathspace&quot; /&gt;&lt;mo&gt;,&lt;/mo&gt;&lt;mspace width=&quot;2em&quot; /&gt;&lt;mfrac&gt;&lt;mrow&gt;&lt;mi&gt;d&lt;/mi&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;/mrow&gt;&lt;mrow&gt;&lt;mi&gt;d&lt;/mi&gt;&lt;mi&gt;t&lt;/mi&gt;&lt;/mrow&gt;&lt;/mfrac&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mi&gt;v&lt;/mi&gt;&lt;mspace width=&quot;thinmathspace&quot; /&gt;&lt;mo&gt;,&lt;/mo&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="31.656ex" height="5.204ex" viewBox="0 -1455.8 13629.6 2240.6" role="img" focusable="false" aria-hidden="true" style="vertical-align: -1.823ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><g transform="translate(120,0)"><rect stroke="none" width="1129" height="60" x="0" y="220"></rect><g transform="translate(60,676)"><use xlink:href="#MJMATHI-64" x="0" y="0"></use><use xlink:href="#MJMATHI-76" x="523" y="0"></use></g><g transform="translate(122,-686)"><use xlink:href="#MJMATHI-64" x="0" y="0"></use><use xlink:href="#MJMATHI-74" x="523" y="0"></use></g></g><use xlink:href="#MJMAIN-3D" x="1646" y="0"></use><use xlink:href="#MJMATHI-48" x="2703" y="0"></use><use xlink:href="#MJMAIN-28" x="3591" y="0"></use><use xlink:href="#MJMATHI-78" x="3981" y="0"></use><use xlink:href="#MJMAIN-29" x="4553" y="0"></use><use xlink:href="#MJMAIN-2B" x="5165" y="0"></use><use xlink:href="#MJMATHI-53" x="6166" y="0"></use><use xlink:href="#MJMATHI-76" x="6811" y="0"></use><use xlink:href="#MJMAIN-2C" x="7463" y="0"></use><g transform="translate(9742,0)"><g transform="translate(286,0)"><rect stroke="none" width="1216" height="60" x="0" y="220"></rect><g transform="translate(60,676)"><use xlink:href="#MJMATHI-64" x="0" y="0"></use><use xlink:href="#MJMATHI-78" x="523" y="0"></use></g><g transform="translate(165,-686)"><use xlink:href="#MJMATHI-64" x="0" y="0"></use><use xlink:href="#MJMATHI-74" x="523" y="0"></use></g></g></g><use xlink:href="#MJMAIN-3D" x="11642" y="0"></use><use xlink:href="#MJMATHI-76" x="12698" y="0"></use><use xlink:href="#MJMAIN-2C" x="13351" y="0"></use></g></svg><span class="MJX_Assistive_MathML MJX_Assistive_MathML_Block" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mfrac><mrow><mi>d</mi><mi>v</mi></mrow><mrow><mi>d</mi><mi>t</mi></mrow></mfrac><mo>=</mo><mi>H</mi><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo><mo>+</mo><mi>S</mi><mi>v</mi><mspace width="thinmathspace"></mspace><mo>,</mo><mspace width="2em"></mspace><mfrac><mrow><mi>d</mi><mi>x</mi></mrow><mrow><mi>d</mi><mi>t</mi></mrow></mfrac><mo>=</mo><mi>v</mi><mspace width="thinmathspace"></mspace><mo>,</mo></math></span></span></div><script type="math/tex; mode=display" id="MathJax-Element-40"> \frac{dv}{dt} = H(x) + S v\,,\qquad \frac{dx}{dt} = v\,, </script>
where <span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-41-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;mi&gt;H&lt;/mi&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="2.064ex" height="2.087ex" viewBox="0 -784.8 888.5 898.7" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.264ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-48" x="0" y="0"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>H</mi></math></span></span><script type="math/tex" id="MathJax-Element-41">H</script> is a hyperelastic model and <span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-42-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;mi&gt;S&lt;/mi&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.499ex" height="2.087ex" viewBox="0 -784.8 645.5 898.7" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.264ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-53" x="0" y="0"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>S</mi></math></span></span><script type="math/tex" id="MathJax-Element-42">S</script> is a viscosity operator of
Laplacian type. The geometry of the domain is assumed to be as follows:</p>
<p><img alt="" src="../doc/web/examples/ex10-domain.png"></p>
<p>The example demonstrates the use of nonlinear operators, as well as their
implicit time integration using a Newton method for solving an associated
reduced backward-Euler type nonlinear equation. Each Newton step requires the
inversion of a Jacobian matrix, which is done through a (preconditioned) inner
solver.</p>
<p><em>The example has a serial (<a href="https://github.com/mfem/mfem/blob/master/examples/ex10.cpp">ex10.cpp</a>)
and a parallel (<a href="https://github.com/mfem/mfem/blob/master/examples/ex10p.cpp">ex10p.cpp</a>) version.
It also has a SUNDIALS modification in <a href="https://github.com/mfem/mfem/blob/master/examples/sundials">examples/sundials</a>
and a PETSc modification in <a href="https://github.com/mfem/mfem/blob/master/examples/petsc">examples/petsc</a>.
We recommend viewing examples 2 and 9 before viewing this example.</em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>

<div id="ex11" style="display: block;">

<h2 id="example-11-laplace-eigenproblem">Example 11: Laplace Eigenproblem</h2>
<p><img class="floatright" src="../doc/web/examples/ex11.png"></p>
<p>This example code demonstrates the use of MFEM to solve the eigenvalue problem
<span class="MathJax_Preview" style="color: inherit; display: none;"></span><div class="MathJax_SVG_Display" style="text-align: center;"><span class="MathJax_SVG" id="MathJax-Element-43-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot; display=&quot;block&quot;&gt;&lt;mo&gt;&amp;#x2212;&lt;/mo&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;&amp;#x0394;&lt;/mi&gt;&lt;mi&gt;u&lt;/mi&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mi&gt;&amp;#x03BB;&lt;/mi&gt;&lt;mi&gt;u&lt;/mi&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="10.857ex" height="2.217ex" viewBox="0 -784.8 4674.6 954.6" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.394ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAIN-2212" x="0" y="0"></use><use xlink:href="#MJMAIN-394" x="778" y="0"></use><use xlink:href="#MJMATHI-75" x="1612" y="0"></use><use xlink:href="#MJMAIN-3D" x="2462" y="0"></use><use xlink:href="#MJMATHI-3BB" x="3518" y="0"></use><use xlink:href="#MJMATHI-75" x="4102" y="0"></use></g></svg><span class="MJX_Assistive_MathML MJX_Assistive_MathML_Block" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mo>−</mo><mi mathvariant="normal">Δ</mi><mi>u</mi><mo>=</mo><mi>λ</mi><mi>u</mi></math></span></span></div><script type="math/tex; mode=display" id="MathJax-Element-43">-\Delta u = \lambda u</script> with homogeneous Dirichlet boundary conditions.</p>
<p>We compute a number of the lowest eigenmodes by discretizing the Laplacian and
Mass operators using a finite element space of the specified order, or an
isoparametric/isogeometric space if order &lt; 1 (quadratic for quadratic
curvilinear mesh, NURBS for NURBS mesh, etc.)</p>
<p>The example highlights the use of the LOBPCG eigenvalue solver together with the
BoomerAMG preconditioner in HYPRE, as well as optionally the SuperLU parallel
direct solver. Reusing a single <a href="http://glvis.org">GLVis</a> visualization window
for multiple eigenfunctions is also illustrated.</p>
<p><em>The example has only a parallel
(<a href="https://github.com/mfem/mfem/blob/master/examples/ex11p.cpp">ex11p.cpp</a>) version.
We recommend viewing Example 1 before viewing this example.</em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>

<div id="ex12" style="display: block;">

<h2 id="example-12-linear-elasticity-eigenproblem">Example 12: Linear Elasticity Eigenproblem</h2>
<p><img class="floatright" src="../doc/web/examples/ex12.png"></p>
<p>This example code solves the linear elasticity eigenvalue
problem for a multi-material cantilever beam.
Specifically, we compute a number of the lowest eigenmodes by approximating the weak form of
<span class="MathJax_Preview" style="color: inherit; display: none;"></span><div class="MathJax_SVG_Display" style="text-align: center;"><span class="MathJax_SVG" id="MathJax-Element-44-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot; display=&quot;block&quot;&gt;&lt;mo&gt;&amp;#x2212;&lt;/mo&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;d&lt;/mi&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;i&lt;/mi&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;v&lt;/mi&gt;&lt;/mrow&gt;&lt;mo stretchy=&quot;false&quot;&gt;(&lt;/mo&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi&gt;&amp;#x03C3;&lt;/mi&gt;&lt;/mrow&gt;&lt;mo stretchy=&quot;false&quot;&gt;(&lt;/mo&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi mathvariant=&quot;bold&quot;&gt;u&lt;/mi&gt;&lt;/mrow&gt;&lt;mo stretchy=&quot;false&quot;&gt;)&lt;/mo&gt;&lt;mo stretchy=&quot;false&quot;&gt;)&lt;/mo&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mi&gt;&amp;#x03BB;&lt;/mi&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi mathvariant=&quot;bold&quot;&gt;u&lt;/mi&gt;&lt;/mrow&gt;&lt;mspace width=&quot;thinmathspace&quot; /&gt;&lt;mo&gt;,&lt;/mo&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="18.381ex" height="2.737ex" viewBox="0 -840.7 7914.2 1178.2" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.784ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAIN-2212" x="0" y="0"></use><g transform="translate(778,0)"><use xlink:href="#MJMAIN-64" x="0" y="0"></use><use xlink:href="#MJMAIN-69" x="556" y="0"></use><use xlink:href="#MJMAIN-76" x="835" y="0"></use></g><use xlink:href="#MJMAIN-28" x="2142" y="0"></use><use xlink:href="#MJMATHI-3C3" x="2531" y="0"></use><use xlink:href="#MJMAIN-28" x="3104" y="0"></use><use xlink:href="#MJMAINB-75" x="3493" y="0"></use><use xlink:href="#MJMAIN-29" x="4133" y="0"></use><use xlink:href="#MJMAIN-29" x="4522" y="0"></use><use xlink:href="#MJMAIN-3D" x="5189" y="0"></use><use xlink:href="#MJMATHI-3BB" x="6246" y="0"></use><use xlink:href="#MJMAINB-75" x="6829" y="0"></use><use xlink:href="#MJMAIN-2C" x="7635" y="0"></use></g></svg><span class="MJX_Assistive_MathML MJX_Assistive_MathML_Block" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mo>−</mo><mrow class="MJX-TeXAtom-ORD"><mi mathvariant="normal">d</mi><mi mathvariant="normal">i</mi><mi mathvariant="normal">v</mi></mrow><mo stretchy="false">(</mo><mrow class="MJX-TeXAtom-ORD"><mi>σ</mi></mrow><mo stretchy="false">(</mo><mrow class="MJX-TeXAtom-ORD"><mi mathvariant="bold">u</mi></mrow><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mo>=</mo><mi>λ</mi><mrow class="MJX-TeXAtom-ORD"><mi mathvariant="bold">u</mi></mrow><mspace width="thinmathspace"></mspace><mo>,</mo></math></span></span></div><script type="math/tex; mode=display" id="MathJax-Element-44">-{\rm div}({\sigma}({\bf u})) = \lambda {\bf u} \,,</script>
where
<span class="MathJax_Preview" style="color: inherit; display: none;"></span><div class="MathJax_SVG_Display" style="text-align: center;"><span class="MathJax_SVG" id="MathJax-Element-45-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot; display=&quot;block&quot;&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi&gt;&amp;#x03C3;&lt;/mi&gt;&lt;/mrow&gt;&lt;mo stretchy=&quot;false&quot;&gt;(&lt;/mo&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi mathvariant=&quot;bold&quot;&gt;u&lt;/mi&gt;&lt;/mrow&gt;&lt;mo stretchy=&quot;false&quot;&gt;)&lt;/mo&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mi&gt;&amp;#x03BB;&lt;/mi&gt;&lt;mspace width=&quot;thinmathspace&quot; /&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;d&lt;/mi&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;i&lt;/mi&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;v&lt;/mi&gt;&lt;/mrow&gt;&lt;mo stretchy=&quot;false&quot;&gt;(&lt;/mo&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi mathvariant=&quot;bold&quot;&gt;u&lt;/mi&gt;&lt;/mrow&gt;&lt;mo stretchy=&quot;false&quot;&gt;)&lt;/mo&gt;&lt;mspace width=&quot;thinmathspace&quot; /&gt;&lt;mi&gt;I&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mi&gt;&amp;#x03BC;&lt;/mi&gt;&lt;mspace width=&quot;thinmathspace&quot; /&gt;&lt;mo stretchy=&quot;false&quot;&gt;(&lt;/mo&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;&amp;#x2207;&lt;/mi&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi mathvariant=&quot;bold&quot;&gt;u&lt;/mi&gt;&lt;/mrow&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;&amp;#x2207;&lt;/mi&gt;&lt;msup&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi mathvariant=&quot;bold&quot;&gt;u&lt;/mi&gt;&lt;/mrow&gt;&lt;mi&gt;T&lt;/mi&gt;&lt;/msup&gt;&lt;mo stretchy=&quot;false&quot;&gt;)&lt;/mo&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="34.996ex" height="2.996ex" viewBox="0 -952.6 15067.6 1290.1" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.784ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-3C3" x="0" y="0"></use><use xlink:href="#MJMAIN-28" x="572" y="0"></use><use xlink:href="#MJMAINB-75" x="962" y="0"></use><use xlink:href="#MJMAIN-29" x="1601" y="0"></use><use xlink:href="#MJMAIN-3D" x="2268" y="0"></use><use xlink:href="#MJMATHI-3BB" x="3325" y="0"></use><g transform="translate(4075,0)"><use xlink:href="#MJMAIN-64" x="0" y="0"></use><use xlink:href="#MJMAIN-69" x="556" y="0"></use><use xlink:href="#MJMAIN-76" x="835" y="0"></use></g><use xlink:href="#MJMAIN-28" x="5438" y="0"></use><use xlink:href="#MJMAINB-75" x="5828" y="0"></use><use xlink:href="#MJMAIN-29" x="6467" y="0"></use><use xlink:href="#MJMATHI-49" x="7023" y="0"></use><use xlink:href="#MJMAIN-2B" x="7750" y="0"></use><use xlink:href="#MJMATHI-3BC" x="8751" y="0"></use><use xlink:href="#MJMAIN-28" x="9521" y="0"></use><use xlink:href="#MJMAIN-2207" x="9911" y="0"></use><use xlink:href="#MJMAINB-75" x="10744" y="0"></use><use xlink:href="#MJMAIN-2B" x="11606" y="0"></use><use xlink:href="#MJMAIN-2207" x="12606" y="0"></use><g transform="translate(13440,0)"><use xlink:href="#MJMAINB-75" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMATHI-54" x="904" y="583"></use></g><use xlink:href="#MJMAIN-29" x="14678" y="0"></use></g></svg><span class="MJX_Assistive_MathML MJX_Assistive_MathML_Block" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mrow class="MJX-TeXAtom-ORD"><mi>σ</mi></mrow><mo stretchy="false">(</mo><mrow class="MJX-TeXAtom-ORD"><mi mathvariant="bold">u</mi></mrow><mo stretchy="false">)</mo><mo>=</mo><mi>λ</mi><mspace width="thinmathspace"></mspace><mrow class="MJX-TeXAtom-ORD"><mi mathvariant="normal">d</mi><mi mathvariant="normal">i</mi><mi mathvariant="normal">v</mi></mrow><mo stretchy="false">(</mo><mrow class="MJX-TeXAtom-ORD"><mi mathvariant="bold">u</mi></mrow><mo stretchy="false">)</mo><mspace width="thinmathspace"></mspace><mi>I</mi><mo>+</mo><mi>μ</mi><mspace width="thinmathspace"></mspace><mo stretchy="false">(</mo><mi mathvariant="normal">∇</mi><mrow class="MJX-TeXAtom-ORD"><mi mathvariant="bold">u</mi></mrow><mo>+</mo><mi mathvariant="normal">∇</mi><msup><mrow class="MJX-TeXAtom-ORD"><mi mathvariant="bold">u</mi></mrow><mi>T</mi></msup><mo stretchy="false">)</mo></math></span></span></div><script type="math/tex; mode=display" id="MathJax-Element-45">{\sigma}({\bf u}) = \lambda\, {\rm div}({\bf u})\,I + \mu\,(\nabla{\bf u} + \nabla{\bf u}^T)</script>
is the stress tensor corresponding to displacement field <span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-46-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;mi mathvariant=&quot;bold&quot;&gt;u&lt;/mi&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.485ex" height="1.568ex" viewBox="0 -561.2 639.5 675" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.264ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAINB-75" x="0" y="0"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi mathvariant="bold">u</mi></math></span></span><script type="math/tex" id="MathJax-Element-46">\bf u</script>, and <span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-47-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;mi&gt;&amp;#x03BB;&lt;/mi&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.355ex" height="2.087ex" viewBox="0 -784.8 583.5 898.7" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.264ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-3BB" x="0" y="0"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>λ</mi></math></span></span><script type="math/tex" id="MathJax-Element-47">\lambda</script> and <span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-48-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;mi&gt;&amp;#x03BC;&lt;/mi&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.402ex" height="1.827ex" viewBox="0 -505.2 603.5 786.8" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.654ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-3BC" x="0" y="0"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>μ</mi></math></span></span><script type="math/tex" id="MathJax-Element-48">\mu</script>
are the material Lame constants. The boundary conditions are
<span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-49-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi mathvariant=&quot;bold&quot;&gt;u&lt;/mi&gt;&lt;/mrow&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="5.746ex" height="1.957ex" viewBox="0 -728.9 2474.1 842.7" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.264ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAINB-75" x="0" y="0"></use><use xlink:href="#MJMAIN-3D" x="917" y="0"></use><use xlink:href="#MJMAIN-30" x="1973" y="0"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><mrow class="MJX-TeXAtom-ORD"><mi mathvariant="bold">u</mi></mrow><mo>=</mo><mn>0</mn></math></span></span><script type="math/tex" id="MathJax-Element-49">{\bf u}=0</script> on the fixed part of the boundary with attribute 1, and
<span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-50-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi&gt;&amp;#x03C3;&lt;/mi&gt;&lt;/mrow&gt;&lt;mo stretchy=&quot;false&quot;&gt;(&lt;/mo&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi mathvariant=&quot;bold&quot;&gt;u&lt;/mi&gt;&lt;/mrow&gt;&lt;mo stretchy=&quot;false&quot;&gt;)&lt;/mo&gt;&lt;mo&gt;&amp;#x22C5;&lt;/mo&gt;&lt;mi&gt;n&lt;/mi&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mi&gt;f&lt;/mi&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="12.075ex" height="2.737ex" viewBox="0 -840.7 5199 1178.2" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.784ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-3C3" x="0" y="0"></use><use xlink:href="#MJMAIN-28" x="572" y="0"></use><use xlink:href="#MJMAINB-75" x="962" y="0"></use><use xlink:href="#MJMAIN-29" x="1601" y="0"></use><use xlink:href="#MJMAIN-22C5" x="2213" y="0"></use><use xlink:href="#MJMATHI-6E" x="2713" y="0"></use><use xlink:href="#MJMAIN-3D" x="3592" y="0"></use><use xlink:href="#MJMATHI-66" x="4648" y="0"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><mrow class="MJX-TeXAtom-ORD"><mi>σ</mi></mrow><mo stretchy="false">(</mo><mrow class="MJX-TeXAtom-ORD"><mi mathvariant="bold">u</mi></mrow><mo stretchy="false">)</mo><mo>⋅</mo><mi>n</mi><mo>=</mo><mi>f</mi></math></span></span><script type="math/tex" id="MathJax-Element-50">{\sigma}({\bf u})\cdot n = f</script> on the remainder.
The geometry of the domain is assumed to be as follows:</p>
<p><img alt="" src="../doc/web/examples/ex12-domain.png"></p>
<p>The example highlights the use of the LOBPCG eigenvalue solver together with the
BoomerAMG preconditioner in HYPRE.
Reusing a single <a href="http://glvis.org">GLVis</a> visualization window for multiple
eigenfunctions is also illustrated.</p>
<p><em>The example has only a parallel
(<a href="https://github.com/mfem/mfem/blob/master/examples/ex12p.cpp">ex12p.cpp</a>) version.
We recommend viewing examples 2 and 11 before viewing this example.</em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>

<div id="ex13" style="display: block;">

<h2 id="example-13-maxwell-eigenproblem">Example 13: Maxwell Eigenproblem</h2>
<p><img class="floatright" src="../doc/web/examples/ex13.png"></p>
<p>This example code solves the Maxwell (electromagnetic)
eigenvalue problem
<span class="MathJax_Preview" style="color: inherit; display: none;"></span><div class="MathJax_SVG_Display" style="text-align: center;"><span class="MathJax_SVG" id="MathJax-Element-51-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot; display=&quot;block&quot;&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;&amp;#x2207;&lt;/mi&gt;&lt;mo&gt;&amp;#x00D7;&lt;/mo&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;&amp;#x2207;&lt;/mi&gt;&lt;mo&gt;&amp;#x00D7;&lt;/mo&gt;&lt;mspace width=&quot;thinmathspace&quot; /&gt;&lt;mi&gt;E&lt;/mi&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mi&gt;&amp;#x03BB;&lt;/mi&gt;&lt;mspace width=&quot;thinmathspace&quot; /&gt;&lt;mi&gt;E&lt;/mi&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="18.332ex" height="2.087ex" viewBox="0 -784.8 7892.8 898.7" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.264ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAIN-2207" x="0" y="0"></use><use xlink:href="#MJMAIN-D7" x="1055" y="0"></use><use xlink:href="#MJMAIN-2207" x="2056" y="0"></use><use xlink:href="#MJMAIN-D7" x="3112" y="0"></use><use xlink:href="#MJMATHI-45" x="4279" y="0"></use><use xlink:href="#MJMAIN-3D" x="5321" y="0"></use><use xlink:href="#MJMATHI-3BB" x="6378" y="0"></use><use xlink:href="#MJMATHI-45" x="7128" y="0"></use></g></svg><span class="MJX_Assistive_MathML MJX_Assistive_MathML_Block" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mi mathvariant="normal">∇</mi><mo>×</mo><mi mathvariant="normal">∇</mi><mo>×</mo><mspace width="thinmathspace"></mspace><mi>E</mi><mo>=</mo><mi>λ</mi><mspace width="thinmathspace"></mspace><mi>E</mi></math></span></span></div><script type="math/tex; mode=display" id="MathJax-Element-51">\nabla\times\nabla\times\, E = \lambda\, E </script>
with  homogeneous Dirichlet boundary conditions <span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-52-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;mi&gt;E&lt;/mi&gt;&lt;mo&gt;&amp;#x00D7;&lt;/mo&gt;&lt;mi&gt;n&lt;/mi&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="10.272ex" height="2.087ex" viewBox="0 -784.8 4422.5 898.7" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.264ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-45" x="0" y="0"></use><use xlink:href="#MJMAIN-D7" x="986" y="0"></use><use xlink:href="#MJMATHI-6E" x="1987" y="0"></use><use xlink:href="#MJMAIN-3D" x="2865" y="0"></use><use xlink:href="#MJMAIN-30" x="3922" y="0"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>E</mi><mo>×</mo><mi>n</mi><mo>=</mo><mn>0</mn></math></span></span><script type="math/tex" id="MathJax-Element-52">E \times n = 0</script>.</p>
<p>We compute a number of the lowest nonzero eigenmodes by
discretizing the curl curl operator using a Nedelec finite element space of
the specified order in 2D or 3D.</p>
<p>The example highlights the use of the AME subspace eigenvalue
solver from HYPRE, which uses LOBPCG and AMS internally.
Reusing a single <a href="http://glvis.org">GLVis</a> visualization window for multiple
eigenfunctions is also illustrated.</p>
<p><em>The example has only a parallel
(<a href="https://github.com/mfem/mfem/blob/master/examples/ex13p.cpp">ex13p.cpp</a>) version.
We recommend viewing examples 3 and 11 before viewing this example.</em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>

<div id="ex14" style="display: block;">

<h2 id="example-14-dg-diffusion">Example 14: DG Diffusion</h2>
<p><img class="floatright" src="../doc/web/examples/ex14.png"></p>
<p>This example code demonstrates the use of MFEM to define a
discontinuous Galerkin (DG) finite element discretization of
the Laplace problem  <span class="MathJax_Preview" style="color: inherit; display: none;"></span><div class="MathJax_SVG_Display" style="text-align: center;"><span class="MathJax_SVG" id="MathJax-Element-53-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot; display=&quot;block&quot;&gt;&lt;mo&gt;&amp;#x2212;&lt;/mo&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;&amp;#x0394;&lt;/mi&gt;&lt;mi&gt;u&lt;/mi&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="9.335ex" height="2.217ex" viewBox="0 -784.8 4019.1 954.6" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.394ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAIN-2212" x="0" y="0"></use><use xlink:href="#MJMAIN-394" x="778" y="0"></use><use xlink:href="#MJMATHI-75" x="1612" y="0"></use><use xlink:href="#MJMAIN-3D" x="2462" y="0"></use><use xlink:href="#MJMAIN-31" x="3518" y="0"></use></g></svg><span class="MJX_Assistive_MathML MJX_Assistive_MathML_Block" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mo>−</mo><mi mathvariant="normal">Δ</mi><mi>u</mi><mo>=</mo><mn>1</mn></math></span></span></div><script type="math/tex; mode=display" id="MathJax-Element-53">-\Delta u = 1</script> with homogeneous Dirichlet
boundary conditions. Finite element spaces of any order,
including zero on regular grids, are supported. The example highlights the use
of discontinuous spaces and DG-specific face integrators.</p>
<p><em>The example has a serial (<a href="https://github.com/mfem/mfem/blob/master/examples/ex14.cpp">ex14.cpp</a>)
and a parallel (<a href="https://github.com/mfem/mfem/blob/master/examples/ex14p.cpp">ex14p.cpp</a>) version.
We recommend viewing examples 1 and 9 before viewing this example.</em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>

<div id="ex15" style="display: block;">

<h2 id="example-15-dynamic-amr">Example 15: Dynamic AMR</h2>
<p><img class="floatright" src="../doc/web/examples/ex15.png"></p>
<p>Building on <a href="#ex6">Example 6</a>, this example demonstrates dynamic adaptive mesh refinement.
The mesh is adapted to a time-dependent solution by refinement
as well as by derefinement. For simplicity, the solution is
prescribed and no time integration is done. However, the error
estimation and refinement/derefinement decisions are realistic.</p>
<p>At each outer iteration the right hand side function is changed
to mimic a time dependent problem.  Within each inner iteration
the problem is solved on a sequence of meshes which are locally
refined according to a simple ZZ error estimator.  At the end
of the inner iteration the error estimates are also used to
identify any elements which may be over-refined and a single
derefinement step is performed.  After each refinement or
derefinement step a rebalance operation is performed to keep
the mesh evenly distributed among the available processors.</p>
<p>The example demonstrates MFEM's capability to refine, derefine
and load balance nonconforming meshes, in 2D and 3D, and on
linear, curved and surface meshes. Interpolation of functions
between coarse and fine meshes, persistent <a href="http://glvis.org">GLVis</a> visualization,
and saving of time-dependent fields for external visualization
with <a href="http://visit.llnl.gov">VisIt</a> are also illustrated.</p>
<p><em>The example has a serial (<a href="https://github.com/mfem/mfem/blob/master/examples/ex15.cpp">ex15.cpp</a>)
and a parallel (<a href="https://github.com/mfem/mfem/blob/master/examples/ex15p.cpp">ex15p.cpp</a>) version.
We recommend viewing examples 1, 6 and 9 before viewing this example.</em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>

<div id="ex16" style="display: block;">

<h2 id="example-16-time-dependent-heat-conduction">Example 16: Time Dependent Heat Conduction</h2>
<p><img class="floatright" src="../doc/web/examples/ex16.png"></p>
<p>This example code solves a simple 2D/3D time dependent nonlinear heat conduction problem
<span class="MathJax_Preview" style="color: inherit; display: none;"></span><div class="MathJax_SVG_Display" style="text-align: center;"><span class="MathJax_SVG" id="MathJax-Element-54-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot; display=&quot;block&quot;&gt;&lt;mfrac&gt;&lt;mrow&gt;&lt;mi&gt;d&lt;/mi&gt;&lt;mi&gt;u&lt;/mi&gt;&lt;/mrow&gt;&lt;mrow&gt;&lt;mi&gt;d&lt;/mi&gt;&lt;mi&gt;t&lt;/mi&gt;&lt;/mrow&gt;&lt;/mfrac&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;&amp;#x2207;&lt;/mi&gt;&lt;mo&gt;&amp;#x22C5;&lt;/mo&gt;&lt;mrow&gt;&lt;mo&gt;(&lt;/mo&gt;&lt;mrow&gt;&lt;mi&gt;&amp;#x03BA;&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mi&gt;&amp;#x03B1;&lt;/mi&gt;&lt;mi&gt;u&lt;/mi&gt;&lt;/mrow&gt;&lt;mo&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;&amp;#x2207;&lt;/mi&gt;&lt;mi&gt;u&lt;/mi&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="22.554ex" height="5.204ex" viewBox="0 -1455.8 9710.6 2240.6" role="img" focusable="false" aria-hidden="true" style="vertical-align: -1.823ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><g transform="translate(120,0)"><rect stroke="none" width="1216" height="60" x="0" y="220"></rect><g transform="translate(60,676)"><use xlink:href="#MJMATHI-64" x="0" y="0"></use><use xlink:href="#MJMATHI-75" x="523" y="0"></use></g><g transform="translate(165,-686)"><use xlink:href="#MJMATHI-64" x="0" y="0"></use><use xlink:href="#MJMATHI-74" x="523" y="0"></use></g></g><use xlink:href="#MJMAIN-3D" x="1733" y="0"></use><use xlink:href="#MJMAIN-2207" x="2790" y="0"></use><use xlink:href="#MJMAIN-22C5" x="3845" y="0"></use><g transform="translate(4346,0)"><use xlink:href="#MJMAIN-28" x="0" y="0"></use><g transform="translate(389,0)"><use xlink:href="#MJMATHI-3BA" x="0" y="0"></use><use xlink:href="#MJMAIN-2B" x="798" y="0"></use><use xlink:href="#MJMATHI-3B1" x="1799" y="0"></use><use xlink:href="#MJMATHI-75" x="2439" y="0"></use></g><use xlink:href="#MJMAIN-29" x="3401" y="0"></use></g><use xlink:href="#MJMAIN-2207" x="8304" y="0"></use><use xlink:href="#MJMATHI-75" x="9138" y="0"></use></g></svg><span class="MJX_Assistive_MathML MJX_Assistive_MathML_Block" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mfrac><mrow><mi>d</mi><mi>u</mi></mrow><mrow><mi>d</mi><mi>t</mi></mrow></mfrac><mo>=</mo><mi mathvariant="normal">∇</mi><mo>⋅</mo><mrow><mo>(</mo><mrow><mi>κ</mi><mo>+</mo><mi>α</mi><mi>u</mi></mrow><mo>)</mo></mrow><mi mathvariant="normal">∇</mi><mi>u</mi></math></span></span></div><script type="math/tex; mode=display" id="MathJax-Element-54">\frac{du}{dt} = \nabla \cdot \left( \kappa + \alpha u \right) \nabla u</script>
with a natural insulating boundary condition <span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-55-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;mfrac&gt;&lt;mrow&gt;&lt;mi&gt;d&lt;/mi&gt;&lt;mi&gt;u&lt;/mi&gt;&lt;/mrow&gt;&lt;mrow&gt;&lt;mi&gt;d&lt;/mi&gt;&lt;mi&gt;n&lt;/mi&gt;&lt;/mrow&gt;&lt;/mfrac&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="6.943ex" height="3.516ex" viewBox="0 -1008.5 2989.3 1513.7" role="img" focusable="false" aria-hidden="true" style="vertical-align: -1.173ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><g transform="translate(120,0)"><rect stroke="none" width="914" height="60" x="0" y="220"></rect><g transform="translate(69,423)"><use transform="scale(0.707)" xlink:href="#MJMATHI-64" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMATHI-75" x="523" y="0"></use></g><g transform="translate(60,-407)"><use transform="scale(0.707)" xlink:href="#MJMATHI-64" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMATHI-6E" x="523" y="0"></use></g></g><use xlink:href="#MJMAIN-3D" x="1432" y="0"></use><use xlink:href="#MJMAIN-30" x="2488" y="0"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><mfrac><mrow><mi>d</mi><mi>u</mi></mrow><mrow><mi>d</mi><mi>n</mi></mrow></mfrac><mo>=</mo><mn>0</mn></math></span></span><script type="math/tex" id="MathJax-Element-55">\frac{du}{dn} = 0</script>.
We linearize the problem by using the temperature field <span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-56-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;mi&gt;u&lt;/mi&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.33ex" height="1.438ex" viewBox="0 -505.2 572.5 619.1" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.264ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-75" x="0" y="0"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>u</mi></math></span></span><script type="math/tex" id="MathJax-Element-56">u</script> from the previous time
step to compute the conductivity coefficient.</p>
<p>This example demonstrates both implicit and explicit time integration as well as a single
Picard step method for linearization. The saving of time dependent data files for external
visualization with <a href="http://visit.llnl.gov">VisIt</a> is also illustrated.</p>
<p><em>The example has a serial (<a href="https://github.com/mfem/mfem/blob/master/examples/ex16.cpp">ex16.cpp</a>)
and a parallel (<a href="https://github.com/mfem/mfem/blob/master/examples/ex16p.cpp">ex16p.cpp</a>) version.
We recommend viewing examples 2, 9, and 10 before viewing this example.</em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>

<div id="ex17" style="display: block;">

<h2 id="example-17-dg-linear-elasticity">Example 17: DG Linear Elasticity</h2>
<p><img class="floatright" src="../doc/web/examples/ex17.png"></p>
<p>This example code solves a simple linear elasticity problem
describing a multi-material cantilever beam using symmetric or
non-symmetric discontinuous Galerkin (DG) formulation.</p>
<p>Specifically, we approximate the weak form of
<span class="MathJax_Preview" style="color: inherit; display: none;"></span><div class="MathJax_SVG_Display" style="text-align: center;"><span class="MathJax_SVG" id="MathJax-Element-57-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot; display=&quot;block&quot;&gt;&lt;mo&gt;&amp;#x2212;&lt;/mo&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;d&lt;/mi&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;i&lt;/mi&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;v&lt;/mi&gt;&lt;/mrow&gt;&lt;mo stretchy=&quot;false&quot;&gt;(&lt;/mo&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi&gt;&amp;#x03C3;&lt;/mi&gt;&lt;/mrow&gt;&lt;mo stretchy=&quot;false&quot;&gt;(&lt;/mo&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi mathvariant=&quot;bold&quot;&gt;u&lt;/mi&gt;&lt;/mrow&gt;&lt;mo stretchy=&quot;false&quot;&gt;)&lt;/mo&gt;&lt;mo stretchy=&quot;false&quot;&gt;)&lt;/mo&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="15.669ex" height="2.737ex" viewBox="0 -840.7 6746.6 1178.2" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.784ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAIN-2212" x="0" y="0"></use><g transform="translate(778,0)"><use xlink:href="#MJMAIN-64" x="0" y="0"></use><use xlink:href="#MJMAIN-69" x="556" y="0"></use><use xlink:href="#MJMAIN-76" x="835" y="0"></use></g><use xlink:href="#MJMAIN-28" x="2142" y="0"></use><use xlink:href="#MJMATHI-3C3" x="2531" y="0"></use><use xlink:href="#MJMAIN-28" x="3104" y="0"></use><use xlink:href="#MJMAINB-75" x="3493" y="0"></use><use xlink:href="#MJMAIN-29" x="4133" y="0"></use><use xlink:href="#MJMAIN-29" x="4522" y="0"></use><use xlink:href="#MJMAIN-3D" x="5189" y="0"></use><use xlink:href="#MJMAIN-30" x="6246" y="0"></use></g></svg><span class="MJX_Assistive_MathML MJX_Assistive_MathML_Block" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mo>−</mo><mrow class="MJX-TeXAtom-ORD"><mi mathvariant="normal">d</mi><mi mathvariant="normal">i</mi><mi mathvariant="normal">v</mi></mrow><mo stretchy="false">(</mo><mrow class="MJX-TeXAtom-ORD"><mi>σ</mi></mrow><mo stretchy="false">(</mo><mrow class="MJX-TeXAtom-ORD"><mi mathvariant="bold">u</mi></mrow><mo stretchy="false">)</mo><mo stretchy="false">)</mo><mo>=</mo><mn>0</mn></math></span></span></div><script type="math/tex; mode=display" id="MathJax-Element-57">-{\rm div}({\sigma}({\bf u})) = 0</script>
where
<span class="MathJax_Preview" style="color: inherit; display: none;"></span><div class="MathJax_SVG_Display" style="text-align: center;"><span class="MathJax_SVG" id="MathJax-Element-58-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot; display=&quot;block&quot;&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi&gt;&amp;#x03C3;&lt;/mi&gt;&lt;/mrow&gt;&lt;mo stretchy=&quot;false&quot;&gt;(&lt;/mo&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi mathvariant=&quot;bold&quot;&gt;u&lt;/mi&gt;&lt;/mrow&gt;&lt;mo stretchy=&quot;false&quot;&gt;)&lt;/mo&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mi&gt;&amp;#x03BB;&lt;/mi&gt;&lt;mspace width=&quot;thinmathspace&quot; /&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;d&lt;/mi&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;i&lt;/mi&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;v&lt;/mi&gt;&lt;/mrow&gt;&lt;mo stretchy=&quot;false&quot;&gt;(&lt;/mo&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi mathvariant=&quot;bold&quot;&gt;u&lt;/mi&gt;&lt;/mrow&gt;&lt;mo stretchy=&quot;false&quot;&gt;)&lt;/mo&gt;&lt;mspace width=&quot;thinmathspace&quot; /&gt;&lt;mi&gt;I&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mi&gt;&amp;#x03BC;&lt;/mi&gt;&lt;mspace width=&quot;thinmathspace&quot; /&gt;&lt;mo stretchy=&quot;false&quot;&gt;(&lt;/mo&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;&amp;#x2207;&lt;/mi&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi mathvariant=&quot;bold&quot;&gt;u&lt;/mi&gt;&lt;/mrow&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;&amp;#x2207;&lt;/mi&gt;&lt;msup&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi mathvariant=&quot;bold&quot;&gt;u&lt;/mi&gt;&lt;/mrow&gt;&lt;mi&gt;T&lt;/mi&gt;&lt;/msup&gt;&lt;mo stretchy=&quot;false&quot;&gt;)&lt;/mo&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="34.996ex" height="2.996ex" viewBox="0 -952.6 15067.6 1290.1" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.784ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-3C3" x="0" y="0"></use><use xlink:href="#MJMAIN-28" x="572" y="0"></use><use xlink:href="#MJMAINB-75" x="962" y="0"></use><use xlink:href="#MJMAIN-29" x="1601" y="0"></use><use xlink:href="#MJMAIN-3D" x="2268" y="0"></use><use xlink:href="#MJMATHI-3BB" x="3325" y="0"></use><g transform="translate(4075,0)"><use xlink:href="#MJMAIN-64" x="0" y="0"></use><use xlink:href="#MJMAIN-69" x="556" y="0"></use><use xlink:href="#MJMAIN-76" x="835" y="0"></use></g><use xlink:href="#MJMAIN-28" x="5438" y="0"></use><use xlink:href="#MJMAINB-75" x="5828" y="0"></use><use xlink:href="#MJMAIN-29" x="6467" y="0"></use><use xlink:href="#MJMATHI-49" x="7023" y="0"></use><use xlink:href="#MJMAIN-2B" x="7750" y="0"></use><use xlink:href="#MJMATHI-3BC" x="8751" y="0"></use><use xlink:href="#MJMAIN-28" x="9521" y="0"></use><use xlink:href="#MJMAIN-2207" x="9911" y="0"></use><use xlink:href="#MJMAINB-75" x="10744" y="0"></use><use xlink:href="#MJMAIN-2B" x="11606" y="0"></use><use xlink:href="#MJMAIN-2207" x="12606" y="0"></use><g transform="translate(13440,0)"><use xlink:href="#MJMAINB-75" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMATHI-54" x="904" y="583"></use></g><use xlink:href="#MJMAIN-29" x="14678" y="0"></use></g></svg><span class="MJX_Assistive_MathML MJX_Assistive_MathML_Block" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mrow class="MJX-TeXAtom-ORD"><mi>σ</mi></mrow><mo stretchy="false">(</mo><mrow class="MJX-TeXAtom-ORD"><mi mathvariant="bold">u</mi></mrow><mo stretchy="false">)</mo><mo>=</mo><mi>λ</mi><mspace width="thinmathspace"></mspace><mrow class="MJX-TeXAtom-ORD"><mi mathvariant="normal">d</mi><mi mathvariant="normal">i</mi><mi mathvariant="normal">v</mi></mrow><mo stretchy="false">(</mo><mrow class="MJX-TeXAtom-ORD"><mi mathvariant="bold">u</mi></mrow><mo stretchy="false">)</mo><mspace width="thinmathspace"></mspace><mi>I</mi><mo>+</mo><mi>μ</mi><mspace width="thinmathspace"></mspace><mo stretchy="false">(</mo><mi mathvariant="normal">∇</mi><mrow class="MJX-TeXAtom-ORD"><mi mathvariant="bold">u</mi></mrow><mo>+</mo><mi mathvariant="normal">∇</mi><msup><mrow class="MJX-TeXAtom-ORD"><mi mathvariant="bold">u</mi></mrow><mi>T</mi></msup><mo stretchy="false">)</mo></math></span></span></div><script type="math/tex; mode=display" id="MathJax-Element-58">{\sigma}({\bf u}) = \lambda\, {\rm div}({\bf u})\,I + \mu\,(\nabla{\bf u} + \nabla{\bf u}^T)</script>
is the stress tensor corresponding to displacement field <span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-59-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi mathvariant=&quot;bold&quot;&gt;u&lt;/mi&gt;&lt;/mrow&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.485ex" height="1.568ex" viewBox="0 -561.2 639.5 675" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.264ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAINB-75" x="0" y="0"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><mrow class="MJX-TeXAtom-ORD"><mi mathvariant="bold">u</mi></mrow></math></span></span><script type="math/tex" id="MathJax-Element-59">{\bf u}</script>, and <span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-60-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;mi&gt;&amp;#x03BB;&lt;/mi&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.355ex" height="2.087ex" viewBox="0 -784.8 583.5 898.7" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.264ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-3BB" x="0" y="0"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>λ</mi></math></span></span><script type="math/tex" id="MathJax-Element-60">\lambda</script> and <span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-61-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;mi&gt;&amp;#x03BC;&lt;/mi&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.402ex" height="1.827ex" viewBox="0 -505.2 603.5 786.8" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.654ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-3BC" x="0" y="0"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>μ</mi></math></span></span><script type="math/tex" id="MathJax-Element-61">\mu</script>
are the material Lame constants. The boundary conditions are
Dirichlet, <span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-62-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi mathvariant=&quot;bold&quot;&gt;u&lt;/mi&gt;&lt;/mrow&gt;&lt;mo mathvariant=&quot;bold&quot;&gt;=&lt;/mo&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;msub&gt;&lt;mi mathvariant=&quot;bold&quot;&gt;u&lt;/mi&gt;&lt;mi mathvariant=&quot;bold&quot;&gt;D&lt;/mi&gt;&lt;/msub&gt;&lt;/mrow&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="8.02ex" height="1.827ex" viewBox="0 -561.2 3453.1 786.8" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.524ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAINB-75" x="0" y="0"></use><use xlink:href="#MJMAINB-3D" x="917" y="0"></use><g transform="translate(2089,0)"><use xlink:href="#MJMAINB-75" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMAINB-44" x="904" y="-213"></use></g></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><mrow class="MJX-TeXAtom-ORD"><mi mathvariant="bold">u</mi></mrow><mo mathvariant="bold">=</mo><mrow class="MJX-TeXAtom-ORD"><msub><mi mathvariant="bold">u</mi><mi mathvariant="bold">D</mi></msub></mrow></math></span></span><script type="math/tex" id="MathJax-Element-62">\bf{u}=\bf{u_D}</script>, on the fixed part of the boundary, namely
boundary attributes 1 and 2; on the rest of the boundary we use
<span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-63-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi&gt;&amp;#x03C3;&lt;/mi&gt;&lt;/mrow&gt;&lt;mo stretchy=&quot;false&quot;&gt;(&lt;/mo&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi mathvariant=&quot;bold&quot;&gt;u&lt;/mi&gt;&lt;/mrow&gt;&lt;mo stretchy=&quot;false&quot;&gt;)&lt;/mo&gt;&lt;mo&gt;&amp;#x22C5;&lt;/mo&gt;&lt;mi&gt;n&lt;/mi&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mn mathvariant=&quot;bold&quot;&gt;0&lt;/mn&gt;&lt;/mrow&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="12.133ex" height="2.737ex" viewBox="0 -840.7 5224 1178.2" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.784ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-3C3" x="0" y="0"></use><use xlink:href="#MJMAIN-28" x="572" y="0"></use><use xlink:href="#MJMAINB-75" x="962" y="0"></use><use xlink:href="#MJMAIN-29" x="1601" y="0"></use><use xlink:href="#MJMAIN-22C5" x="2213" y="0"></use><use xlink:href="#MJMATHI-6E" x="2713" y="0"></use><use xlink:href="#MJMAIN-3D" x="3592" y="0"></use><use xlink:href="#MJMAINB-30" x="4648" y="0"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><mrow class="MJX-TeXAtom-ORD"><mi>σ</mi></mrow><mo stretchy="false">(</mo><mrow class="MJX-TeXAtom-ORD"><mi mathvariant="bold">u</mi></mrow><mo stretchy="false">)</mo><mo>⋅</mo><mi>n</mi><mo>=</mo><mrow class="MJX-TeXAtom-ORD"><mn mathvariant="bold">0</mn></mrow></math></span></span><script type="math/tex" id="MathJax-Element-63">{\sigma}({\bf u})\cdot n = {\bf 0}</script>. The geometry of the domain is assumed to be
as follows:</p>
<p><img alt="" src="../doc/web/examples/ex17-domain.png"></p>
<p>The example demonstrates the use of high-order DG vector finite
element spaces with the linear DG elasticity bilinear form,
meshes with curved elements, and the definition of piece-wise
constant and function vector-coefficient objects. The use of
non-homogeneous Dirichlet b.c. imposed weakly, is also
illustrated.</p>
<p><em>The example has a serial (<a href="https://github.com/mfem/mfem/blob/master/examples/ex17.cpp">ex17.cpp</a>)
and a parallel (<a href="https://github.com/mfem/mfem/blob/master/examples/ex17p.cpp">ex17p.cpp</a>) version.
We recommend viewing examples 2 and 14 before viewing this example.</em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>

<div id="volta" style="display: block;">

<h2 id="volta-miniapp-electrostatics">Volta Miniapp: Electrostatics</h2>
<p><img class="floatright" src="../doc/web/examples/volta.png"></p>
<p>This miniapp demonstrates the use of MFEM to solve realistic problems
in the field of linear electrostatics.  Its features include:</p>
<ul>
<li>dielectric materials</li>
<li>charge densities</li>
<li>surface charge densities</li>
<li>prescribed voltages</li>
<li>applied polarizations</li>
<li>high order meshes</li>
<li>high order basis functions</li>
<li>adaptive mesh refinement</li>
<li>advanced visualization</li>
</ul>
<p>For more details, please see the <a href="http://mfem.org/electromagnetics/">documentation</a> in the
<code>miniapps/electromagnetics</code> directory.</p>
<p><em>The miniapp has only a parallel
(<a href="https://github.com/mfem/mfem/blob/master/miniapps/electromagnetics/volta.cpp">volta.cpp</a>) version.
<strong>We recommend that new users start with the example codes before
moving to the miniapps.</strong></em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>

<div id="tesla" style="display: block;">

<h2 id="tesla-miniapp-magnetostatics">Tesla Miniapp: Magnetostatics</h2>
<p><img class="floatright" src="../doc/web/examples/tesla.png"></p>
<p>This miniapp showcases many of MFEM's features while solving a variety
of realistic magnetostatics problems.  Its features include:</p>
<ul>
<li>diamagnetic and/or paramagnetic materials</li>
<li>ferromagnetic materials</li>
<li>volumetric current densities</li>
<li>surface current densities</li>
<li>external fields</li>
<li>high order meshes</li>
<li>high order basis functions</li>
<li>adaptive mesh refinement</li>
<li>advanced visualization</li>
</ul>
<p>For more details, please see the <a href="http://mfem.org/electromagnetics/">documentation</a> in the
<code>miniapps/electromagnetics</code> directory.</p>
<p><em>The miniapp has only a parallel
(<a href="https://github.com/mfem/mfem/blob/master/miniapps/electromagnetics/tesla.cpp">tesla.cpp</a>) version.
<strong>We recommend that new users start with the example codes before
moving to the miniapps.</strong></em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>

<div id="joule" style="display: block;">

<h2 id="joule-miniapp-transient-magnetics-and-joule-heating">Joule Miniapp: Transient Magnetics and Joule Heating</h2>
<p><img class="floatright" src="../doc/web/examples/joule.png"></p>
<p>This miniapp solves the equations of transient low-frequency (a.k.a. eddy current)
electromagnetics, and simultaneously computes transient heat transfer with the heat source given
by the electromagnetic Joule heating.</p>
<p>Its features include:</p>
<ul>
<li><span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-64-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;msup&gt;&lt;mi&gt;H&lt;/mi&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/msup&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="3.158ex" height="2.347ex" viewBox="0 -896.7 1359.6 1010.5" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.264ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-48" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMAIN-31" x="1280" y="513"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><msup><mi>H</mi><mn>1</mn></msup></math></span></span><script type="math/tex" id="MathJax-Element-64">H^1</script> discretization of the electrostatic potential</li>
<li><span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-65-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;mi&gt;H&lt;/mi&gt;&lt;mo stretchy=&quot;false&quot;&gt;(&lt;/mo&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;c&lt;/mi&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;u&lt;/mi&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;r&lt;/mi&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;l&lt;/mi&gt;&lt;/mrow&gt;&lt;mo stretchy=&quot;false&quot;&gt;)&lt;/mo&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="7.756ex" height="2.737ex" viewBox="0 -840.7 3339.5 1178.2" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.784ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-48" x="0" y="0"></use><use xlink:href="#MJMAIN-28" x="888" y="0"></use><g transform="translate(1278,0)"><use xlink:href="#MJMAIN-63" x="0" y="0"></use><use xlink:href="#MJMAIN-75" x="444" y="0"></use><use xlink:href="#MJMAIN-72" x="1001" y="0"></use><use xlink:href="#MJMAIN-6C" x="1393" y="0"></use></g><use xlink:href="#MJMAIN-29" x="2950" y="0"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>H</mi><mo stretchy="false">(</mo><mrow class="MJX-TeXAtom-ORD"><mi mathvariant="normal">c</mi><mi mathvariant="normal">u</mi><mi mathvariant="normal">r</mi><mi mathvariant="normal">l</mi></mrow><mo stretchy="false">)</mo></math></span></span><script type="math/tex" id="MathJax-Element-65">H(\mathrm{curl})</script> discretization of the electric field</li>
<li><span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-66-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;mi&gt;H&lt;/mi&gt;&lt;mo stretchy=&quot;false&quot;&gt;(&lt;/mo&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;d&lt;/mi&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;i&lt;/mi&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;v&lt;/mi&gt;&lt;/mrow&gt;&lt;mo stretchy=&quot;false&quot;&gt;)&lt;/mo&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="7.04ex" height="2.737ex" viewBox="0 -840.7 3031 1178.2" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.784ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-48" x="0" y="0"></use><use xlink:href="#MJMAIN-28" x="888" y="0"></use><g transform="translate(1278,0)"><use xlink:href="#MJMAIN-64" x="0" y="0"></use><use xlink:href="#MJMAIN-69" x="556" y="0"></use><use xlink:href="#MJMAIN-76" x="835" y="0"></use></g><use xlink:href="#MJMAIN-29" x="2641" y="0"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>H</mi><mo stretchy="false">(</mo><mrow class="MJX-TeXAtom-ORD"><mi mathvariant="normal">d</mi><mi mathvariant="normal">i</mi><mi mathvariant="normal">v</mi></mrow><mo stretchy="false">)</mo></math></span></span><script type="math/tex" id="MathJax-Element-66">H(\mathrm{div})</script> discretization of the magnetic field</li>
<li><span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-67-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;mi&gt;H&lt;/mi&gt;&lt;mo stretchy=&quot;false&quot;&gt;(&lt;/mo&gt;&lt;mrow class=&quot;MJX-TeXAtom-ORD&quot;&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;d&lt;/mi&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;i&lt;/mi&gt;&lt;mi mathvariant=&quot;normal&quot;&gt;v&lt;/mi&gt;&lt;/mrow&gt;&lt;mo stretchy=&quot;false&quot;&gt;)&lt;/mo&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="7.04ex" height="2.737ex" viewBox="0 -840.7 3031 1178.2" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.784ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-48" x="0" y="0"></use><use xlink:href="#MJMAIN-28" x="888" y="0"></use><g transform="translate(1278,0)"><use xlink:href="#MJMAIN-64" x="0" y="0"></use><use xlink:href="#MJMAIN-69" x="556" y="0"></use><use xlink:href="#MJMAIN-76" x="835" y="0"></use></g><use xlink:href="#MJMAIN-29" x="2641" y="0"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>H</mi><mo stretchy="false">(</mo><mrow class="MJX-TeXAtom-ORD"><mi mathvariant="normal">d</mi><mi mathvariant="normal">i</mi><mi mathvariant="normal">v</mi></mrow><mo stretchy="false">)</mo></math></span></span><script type="math/tex" id="MathJax-Element-67">H(\mathrm{div})</script> discretization of the heat flux</li>
<li><span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax_SVG" id="MathJax-Element-68-Frame" tabindex="0" data-mathml="&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;&lt;msup&gt;&lt;mi&gt;L&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msup&gt;&lt;/math&gt;" role="presentation" style="font-size: 100%; display: inline-block; position: relative;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="2.637ex" height="2.347ex" viewBox="0 -896.7 1135.4 1010.5" role="img" focusable="false" aria-hidden="true" style="vertical-align: -0.264ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-4C" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMAIN-32" x="963" y="513"></use></g></svg><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><msup><mi>L</mi><mn>2</mn></msup></math></span></span><script type="math/tex" id="MathJax-Element-68">L^2</script> discretization of the temperature</li>
<li>implicit transient time integration</li>
<li>high order meshes</li>
<li>high order basis functions</li>
<li>adaptive mesh refinement</li>
<li>advanced visualization</li>
</ul>
<p>For more details, please see the <a href="http://mfem.org/electromagnetics/">documentation</a> in the
<code>miniapps/electromagnetics</code> directory.</p>
<p><em>The miniapp has only a parallel
(<a href="https://github.com/mfem/mfem/blob/master/miniapps/electromagnetics/joule.cpp">joule.cpp</a>) version.
<strong>We recommend that new users start with the example codes before
moving to the miniapps.</strong></em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>

<div id="mobius-strip" style="display: block;">

<h2 id="mobius-strip-miniapp">Mobius Strip Miniapp</h2>
<p><img class="floatright" src="../doc/web/examples/mobius-strip.png"></p>
<p>This miniapp generates various Mobius strip-like surface meshes. It is a good
way to generate complex surface meshes.</p>
<p>Manipulating the mesh topology and performing mesh transformation are demonstrated.</p>
<p>The <code>mobius-strip</code> mesh in the <code>data</code> directory was generated with this miniapp.</p>
<p>For more details, please see the <a href="http://mfem.org/meshing/">documentation</a> in the
<code>miniapps/meshing</code> directory.</p>
<p><em>The miniapp has only a serial
(<a href="https://github.com/mfem/mfem/blob/master/miniapps/meshing/mobius-strip.cpp">mobius-strip.cpp</a>) version.
<strong>We recommend that new users start with the example codes before
moving to the miniapps.</strong></em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>

<div id="klein-bottle" style="display: block;">

<h2 id="klein-bottle-miniapp">Klein Bottle Miniapp</h2>
<p><img class="floatright" src="../doc/web/examples/klein-bottle.png"></p>
<p>This miniapp generates three types of Klein bottle surfaces. It is similar to
the mobius-strip miniapp.</p>
<p>Manipulating the mesh topology and performing mesh transformation are demonstrated.</p>
<p>The <code>klein-bottle</code> and <code>klein-donut</code> meshes in the <code>data</code> directory was generated with this miniapp.</p>
<p>For more details, please see the <a href="http://mfem.org/meshing/">documentation</a> in the
<code>miniapps/meshing</code> directory.</p>
<p><em>The miniapp has only a serial
(<a href="https://github.com/mfem/mfem/blob/master/miniapps/meshing/klein-bottle.cpp">klein-bottle.cpp</a>) version.
<strong>We recommend that new users start with the example codes before
moving to the miniapps.</strong></em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>

<div id="shaper" style="display: block;">

<h2 id="shaper-miniapp">Shaper Miniapp</h2>
<p><img class="floatright" src="../doc/web/examples/shaper.png"></p>
<p>This miniapp performs multiple levels of adaptive mesh refinement to resolve the
interfaces between different "materials" in the mesh, as specified by a given
material function.</p>
<p>It can be used as a simple initial mesh generator, for example in the case when
the interface is too complex to describe without local refinement. Both
conforming and non-conforming refinements are supported.</p>
<p>For more details, please see the <a href="http://mfem.org/meshing/">documentation</a> in the
<code>miniapps/meshing</code> directory.</p>
<p><em>The miniapp has only a serial
(<a href="https://github.com/mfem/mfem/blob/master/miniapps/meshing/shaper.cpp">shaper.cpp</a>) version.
<strong>We recommend that new users start with the example codes before
moving to the miniapps.</strong></em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>

<div id="mesh-explorer" style="display: block;">

<h2 id="mesh-explorer-miniapp">Mesh Explorer Miniapp</h2>
<p><img class="floatright" src="../doc/web/examples/mesh-explorer.png"></p>
<p>This miniapp is a handy tool to examine, visualize and manipulate a given
mesh. Some of its features are:</p>
<ul>
<li>visualizing of mesh materials and individual mesh elements</li>
<li>mesh scaling, randomization, and general transformation</li>
<li>manipulation of the mesh curvature</li>
<li>the ability to simulate parallel partitioning</li>
<li>quantitative and visual reports of mesh quality</li>
</ul>
<p>For more details, please see the <a href="http://mfem.org/meshing/">documentation</a> in the
<code>miniapps/meshing</code> directory.</p>
<p><em>The miniapp has only a serial
(<a href="https://github.com/mfem/mfem/blob/master/miniapps/meshing/mesh-explorer.cpp">mesh-explorer.cpp</a>) version.
<strong>We recommend that new users start with the example codes before moving to the miniapps.</strong></em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>

<!-- ------------------------------------------------------------------------- -->

<div id="nomatch" style="display: none;">
<br><br><br>
<center>
No examples or miniapps match your criteria.
</center>
<br><br><br>
<hr>
</div>

<div style="clear:both;"></div>

<script type="text/javascript"><!--
function isChecked(id)
{
    return document.getElementById(id).checked;
}

function setChecked(id, value)
{
    document.getElementById(id).checked = value;
}

function showElement(id, show)
{
    //document.getElementById(id).style.display = show ? "block" : "none";

    // workaround because Doxygen splits and duplicates the divs for some reason
    var divs = document.getElementsByTagName("div");
    for (i = 0; i < divs.length; i++)
        if (divs.item(i).id == id)
            divs.item(i).style.display = show ? "block" : "none";
}

function updateGroup(names, id)
{
   // make only one box checked in the group
   if (names.indexOf(id) != -1)
      for (i = 0; i < names.length; ++i)
         setChecked(names[i], id == names[i]);

   // generate boolean variables from the group names
   for (i = 0; i < names.length; ++i)
      this[names[i]] = isChecked(names[i]) || isChecked(names[0]);
}

function elementVisible(id)
{
   var elem = document.getElementById(id);
   return elem != null && elem.style.display != "none";
}

function exampleVisible(num)
{
   return elementVisible("ex"+num);// || elementVisible("ex"+num+"p");
}

function update(id)
{
   var group1 = ["all1", "laplace", "elasticity", "maxwell", "graddiv", "darcy", "advection", "conduction", "meshing", "hpc"];
   var group2 = ["all2", "l2", "h1", "hcurl", "hdiv", "h12"];
   var group3 = ["all3", "galerkin", "mixed", "dg", "dpg", "hybr", "staticcond", "nurbs", "amr" ];
   var group4 = ["all4", "jacobi", "gs", "pcg", "minres", "gmres", "amg", "ams", "ads", "superlu", "umfpack", "newton", "rk", "sdirk", "lobpcg", "sundials", "petsc"];

   updateGroup(group1, id);
   updateGroup(group2, id);
   updateGroup(group3, id);
   updateGroup(group4, id);

   // Example codes
   var numExamples = 17; // update when adding examples!
   showElement("ex1",  (laplace  || hpc) && h1 && (galerkin || nurbs || staticcond) && (gs || pcg || umfpack || amg || petsc));
   showElement("ex2",  elasticity && h1 && (galerkin || nurbs || staticcond) && (gs || pcg || umfpack || amg || petsc));
   showElement("ex3",  maxwell && hcurl && (galerkin || staticcond) && (gs || pcg || umfpack || ams || petsc));
   showElement("ex4",  graddiv && (hdiv || h12) && (galerkin || hybr || staticcond) && (gs || pcg || umfpack || amg || ads || ams || petsc));
   showElement("ex5",  darcy && (l2 || hdiv) && mixed && (gs || jacobi || minres || umfpack || amg  || petsc));
   showElement("ex6",  laplace && h1 && (galerkin || nurbs || amr) && (gs || pcg || umfpack || amg || petsc));
   showElement("ex7",  (laplace || meshing) && h1 && (galerkin || amr) && (gs || pcg || umfpack || amg));
   showElement("ex8",  laplace && (l2 || h1 || h12) && dpg && (gs || pcg || umfpack || amg || ads || ams));
   showElement("ex9",  advection && l2 && dg && (pcg || rk || sundials || petsc));
   showElement("ex10", elasticity && (l2 || h1) && galerkin && (jacobi || pcg || minres || umfpack || newton || rk || sdirk || sundials || petsc));
   showElement("ex11", laplace && h1 && (galerkin || nurbs) && (lobpcg || amg || superlu));
   showElement("ex12", elasticity && h1 && (galerkin || nurbs) && (lobpcg || amg));
   showElement("ex13", maxwell && hcurl && galerkin && (lobpcg || ams));
   showElement("ex14", laplace && l2 && dg && (gs || pcg || gmres || umfpack || amg));
   showElement("ex15", laplace && h1 && (galerkin || nurbs || amr) && (gs || pcg || umfpack || amg));
   showElement("ex16", conduction && h1 && galerkin && (pcg || jacobi || rk || sdirk));
   showElement("ex17", elasticity && l2 && dg && (gs || pcg || gmres || umfpack || amg));

   // Electromagnetic miniapps
   numExamples += 3; // update when adding miniapps!
   showElement("volta", maxwell && (l2 || hdiv) && (galerkin || amr) && (pcg || amg));
   showElement("tesla", maxwell && (hdiv || hcurl) && (galerkin || amr) && (pcg || amg || ams));
   showElement("joule", (maxwell || conduction) && (l2 || h1 || hdiv || hcurl) && (galerkin || amr || staticcond) && (pcg || amg || ams || ads || sdirk));

   // Meshing miniapps
   numExamples += 4; // update when adding miniapps!
   showElement("mobius-strip", meshing && all2 && all3 && all4);
   showElement("klein-bottle", meshing && all2 && all3 && all4);
   showElement("shaper", meshing && all2 && all3 && all4);
   showElement("mesh-explorer", meshing && all2 && all3 && all4);

   var allHidden = true;
   for (i = 1; i <= numExamples; i++) {  // FIXME this no longer works with the miniapps!
      if (exampleVisible(i)) {
         allHidden = false;
         break;
      }
   }
   showElement("nomatch", allHidden);
}

function initButtons()
{
   var query = location.search.substr(1);
   query.split("&").forEach(function(id)
   {
      setChecked(id, true);
      update(id);
   });
}

// make sure "no match" div is not visible after page is loaded
window.onload = update;

// force vertical scrollbar
document.getElementsByTagName("body")[0].style = "overflow-y: scroll"

// parse URL part after '?', e.g., http://.../index.html?elasticity&nurbs
initButtons();

//--></script></div>

            
        </div>

        <footer class="footer">
           <div class="container">
              <p class="text-muted alignright">LLNL-WEB-676715</p>
              <p class="text-muted alignleft">
                  Developed by the <a href="/about/">MFEM team</a> at
                  <a href="http://computation.llnl.gov/casc/">CASC</a>,
                  <a href="https://www.llnl.gov/">LLNL</a></p>
           </div>
        </footer>

        <script src="../doc/web/jquery-1.10.2.min.js"></script>
        <script src="../doc/web/bootstrap-3.0.3.min.js"></script>
        <script src="../doc/web/highlight.pack.js"></script>
        <script src="../doc/web/base.js"></script>
        <script src="../doc/web/retina.min.js"></script>
    

</body></html>
